Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xattr/lib_build.h file not getting installed with poetry installation #8528

Closed
4 tasks done
WeirdWolves opened this issue Oct 10, 2023 · 6 comments · Fixed by #8801
Closed
4 tasks done

xattr/lib_build.h file not getting installed with poetry installation #8528

WeirdWolves opened this issue Oct 10, 2023 · 6 comments · Fixed by #8801
Labels
kind/bug Something isn't working as expected

Comments

@WeirdWolves
Copy link

  • Poetry version: 1.6.1
  • Python version: 3.8.14
  • OS version and name: MacOS Ventura 13.5.2
  • pyproject.toml:
  • I am on the latest stable Poetry version, installed using a recommended method.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have consulted the FAQ and blog for any relevant entries or release notes.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below.

Issue

Trying to downgrade numpy version from 1.24 to 1.19.5. It says xattr/lib_build.h file not found. Reinstalling poetry does not resolve the error.

ImportError

dlopen(/Users/nabekhan/Library/Application Support/pypoetry/venv/lib/python3.8/site-packages/_cffi_backend.cpython-38-darwin.so, 0x0002): symbol not found in flat namespace '_ffi_prep_closure'

at ~/Library/Application Support/pypoetry/venv/lib/python3.8/site-packages/xattr/lib.py:7 in
3│
4│ from .compat import fs_encode
5│
6│ try:
→ 7│ from ._lib import lib, ffi
8│ except ImportError:
9│ from .lib_build import ffi, c_source
10│ lib = ffi.verify(c_source)
11│

The following error occurred when trying to handle this error:

Stack trace:

12 ~/Library/Application Support/pypoetry/venv/lib/python3.8/site-packages/cleo/application.py:327 in run
325│
326│ try:
→ 327│ exit_code = self._run(io)
328│ except BrokenPipeError:
329│ # If we are piped to another process, it may close early and send a

11 ~/Library/Application Support/pypoetry/venv/lib/python3.8/site-packages/poetry/console/application.py:190 in _run
188│ self._load_plugins(io)
189│
→ 190│ exit_code: int = super()._run(io)
191│ return exit_code
192│

10 ~/Library/Application Support/pypoetry/venv/lib/python3.8/site-packages/cleo/application.py:431 in _run
429│ io.input.interactive(interactive)
430│
→ 431│ exit_code = self._run_command(command, io)
432│ self._running_command = None
433│

9 ~/Library/Application Support/pypoetry/venv/lib/python3.8/site-packages/cleo/application.py:473 in _run_command
471│
472│ if error is not None:
→ 473│ raise error
474│
475│ return terminate_event.exit_code

8 ~/Library/Application Support/pypoetry/venv/lib/python3.8/site-packages/cleo/application.py:454 in _run_command
452│
453│ try:
→ 454│ self._event_dispatcher.dispatch(command_event, COMMAND)
455│
456│ if command_event.command_should_run():

7 ~/Library/Application Support/pypoetry/venv/lib/python3.8/site-packages/cleo/events/event_dispatcher.py:26 in dispatch
24│
25│ if listeners:
→ 26│ self._do_dispatch(listeners, event_name, event)
27│
28│ return event

6 ~/Library/Application Support/pypoetry/venv/lib/python3.8/site-packages/cleo/events/event_dispatcher.py:89 in _do_dispatch
87│ break
88│
→ 89│ listener(event, event_name, self)
90│
91│ def _sort_listeners(self, event_name: str) -> None:

5 ~/Library/Application Support/pypoetry/venv/lib/python3.8/site-packages/poetry/console/application.py:299 in configure_env
297│
298│ env_manager = EnvManager(poetry, io=io)
→ 299│ env = env_manager.create_venv()
300│
301│ if env.is_venv() and io.is_verbose():

4 ~/Library/Application Support/pypoetry/venv/lib/python3.8/site-packages/poetry/utils/env/env_manager.py:585 in create_venv
583│
584│ if create_venv:
→ 585│ self.build_venv(
586│ venv,
587│ executable=executable,

3 ~/Library/Application Support/pypoetry/venv/lib/python3.8/site-packages/poetry/utils/env/env_manager.py:668 in build_venv
666│ # TODO: Add backup-ignore markers for other platforms too
667│ if sys.platform == "darwin":
→ 668│ import xattr
669│
670│ xattr.setxattr(

2 ~/Library/Application Support/pypoetry/venv/lib/python3.8/site-packages/xattr/init.py:13 in
11│
12│ from .compat import integer_types
→ 13│ from .lib import (XATTR_NOFOLLOW, XATTR_CREATE, XATTR_REPLACE,
14│ XATTR_NOSECURITY, XATTR_MAXNAMELEN, XATTR_FINDERINFO_NAME,
15│ XATTR_RESOURCEFORK_NAME, _getxattr, _fgetxattr, _setxattr, _fsetxattr,

1 ~/Library/Application Support/pypoetry/venv/lib/python3.8/site-packages/xattr/lib.py:9 in
7│ from ._lib import lib, ffi
8│ except ImportError:
→ 9│ from .lib_build import ffi, c_source
10│ lib = ffi.verify(c_source)
11│

FileNotFoundError

[Errno 2] No such file or directory: '/Users/nabekhan/Library/Application Support/pypoetry/venv/lib/python3.8/site-packages/xattr/lib_build.h'

at ~/Library/Application Support/pypoetry/venv/lib/python3.8/site-packages/xattr/lib_build.py:7 in
3│ from cffi import FFI
4│
5│ PATH = os.path.dirname(file)
6│
→ 7│ with open(os.path.join(PATH, 'lib_build.h')) as hf:
8│ c_header = hf.read()
9│ with open(os.path.join(PATH, 'lib_build.c')) as cf:
10│ c_source = cf.read()
11│

@WeirdWolves WeirdWolves added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Oct 10, 2023
@dimbleby
Copy link
Contributor

#6891

@WeirdWolves
Copy link
Author

WeirdWolves commented Oct 10, 2023

Done that already. Re-installed everything from scratch . Now can't even run poetry install or poetry lock. It gives the error:
[Errno 2] No such file or directory: '/Users/nabekhan/Library/Application Support/pypoetry/venv/lib/python3.8/site-packages/xattr/lib_build.h'

@dimbleby
Copy link
Contributor

Per #6891, this reproduced without using poetry at all.

You probably want help from the xattr folk.

@finswimmer
Copy link
Member

Hey @WeirdWolves,

I'm closing this, because this is not a Poetry issue as @dimbleby pointed out.

fin swimmer

@finswimmer finswimmer closed this as not planned Won't fix, can't repro, duplicate, stale Oct 11, 2023
@mrmeszaros
Copy link
Contributor

@dimbleby @finswimmer In the meantime devs at xattr say thex have fixed it - based on this comment: xattr/xattr#108 (comment)

mrmeszaros added a commit to mrmeszaros/poetry that referenced this issue Nov 23, 2023
@Secrus Secrus mentioned this issue Dec 17, 2023
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
@abn abn removed the status/triage This issue needs to be triaged label Mar 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants