-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
- 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 (
-vvvoption) 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│