-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
not found mac M1 install
#6891
Comments
looks like it's a problem simply with If you create a new virtual environment, Perhaps we are learning that If so, suggest that submitting a pull request putting a try-except near to poetry/src/poetry/utils/env.py Lines 1104 to 1110 in 1ec8be3
|
$ python -c "import xattr"
Traceback (most recent call last):
File "/Users/gauthiercastro/.pyenv/versions/3.8.13/lib/python3.8/site-packages/xattr/lib.py", line 7, in <module>
from ._lib import lib, ffi
ImportError: dlopen(/Users/gauthiercastro/.pyenv/versions/3.8.13/lib/python3.8/site-packages/_cffi_backend.cpython-38-darwin.so, 0x0002): Library not loaded: '@rpath/libffi.8.dylib'
Referenced from: '/Users/gauthiercastro/.pyenv/versions/3.8.13/lib/python3.8/site-packages/_cffi_backend.cpython-38-darwin.so'
Reason: tried: '/Users/gauthiercastro/miniconda3/envs/speccheck_eval/lib/libffi.8.dylib' (no such file), '/Users/gauthiercastro/miniconda3/envs/speccheck_eval/lib/libffi.8.dylib' (no such file), '/Users/gauthiercastro/miniconda3/envs/speccheck_eval/lib/libffi.8.dylib' (no such file), '/Users/gauthiercastro/miniconda3/envs/speccheck_eval/lib/libffi.8.dylib' (no such file), '/opt/homebrew/lib/libffi.8.dylib' (no such file), '/opt/homebrew/lib/libffi.8.dylib' (no such file), '/opt/homebrew/lib/libffi.8.dylib' (no such file), '/opt/homebrew/lib/libffi.8.dylib' (no such file), '/opt/homebrew/lib/libffi.8.dylib' (no such file), '/opt/homebrew/lib/libffi.8.dylib' (no such file), '/usr/local/lib/libffi.8.dylib' (no such file), '/usr/lib/libffi.8.dylib' (no such file)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/gauthiercastro/.pyenv/versions/3.8.13/lib/python3.8/site-packages/xattr/__init__.py", line 13, in <module>
from .lib import (XATTR_NOFOLLOW, XATTR_CREATE, XATTR_REPLACE,
File "/Users/gauthiercastro/.pyenv/versions/3.8.13/lib/python3.8/site-packages/xattr/lib.py", line 9, in <module>
from .lib_build import ffi, c_source
File "/Users/gauthiercastro/.pyenv/versions/3.8.13/lib/python3.8/site-packages/xattr/lib_build.py", line 7, in <module>
with open(os.path.join(PATH, 'lib_build.h')) as hf:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/gauthiercastro/.pyenv/versions/3.8.13/lib/python3.8/site-packages/xattr/lib_build.h' |
I have uninstalled/re-installed both |
I see that xattr say that it's a problem with your environment, and that would seem to be consistent with "well it works now". Anyway it seems you got far enough to prove that if this was anyone's problem it was an xattr problem and not a poetry problem: so I guess this should be closed out. |
# Pull Request Check List Resolves: #6928 <!-- This is just a reminder about the most common mistakes. Please make sure that you tick all *appropriate* boxes. But please read our [contribution guide](https://python-poetry.org/docs/contributing/) at least once, it will save you unnecessary review cycles! --> - [ ] Added **tests** for changed code. - [ ] Updated **documentation** for changed code. <!-- If you have *any* questions to *any* of the points above, just **submit and ask**! This checklist is here to *help* you, not to deter you from contributing! --> Bump `xattr` version to `0.10.0`. This fixes #6891, which is not a problem with the user's environment as suggested by the maintainer of xattr at xattr/xattr#108, but in fact the problem of the package which was fixed by xattr/xattr#106. Looking at the [changes in the version bump](xattr/xattr@v0.9.9...v0.10.0), there does not seem to be any significant changes other than shabang xattr/xattr#106. Co-authored-by: Moonsik Park <[email protected]> Co-authored-by: Bartosz Sokorski <[email protected]>
update lockfile. pip install --no-input everywhere (python-poetry#6966) This is an extension of python-poetry#6724. I think `pip install` invoked by poetry should never ask for user input. Motivation is that it happened to myself and a number of colleagues many times that poetry got seemingly stuck while it was just waiting for a user input because of a private pypi repository that needed authentication. I hope this is a valuable contribution to a tool I like a lot and would like to use more and more :) docs: update Windows cache path to match 1.2 Bump `xattr` version to `0.10.0`. (python-poetry#7005) Resolves: python-poetry#6928 <!-- This is just a reminder about the most common mistakes. Please make sure that you tick all *appropriate* boxes. But please read our [contribution guide](https://python-poetry.org/docs/contributing/) at least once, it will save you unnecessary review cycles! --> - [ ] Added **tests** for changed code. - [ ] Updated **documentation** for changed code. <!-- If you have *any* questions to *any* of the points above, just **submit and ask**! This checklist is here to *help* you, not to deter you from contributing! --> Bump `xattr` version to `0.10.0`. This fixes python-poetry#6891, which is not a problem with the user's environment as suggested by the maintainer of xattr at xattr/xattr#108, but in fact the problem of the package which was fixed by xattr/xattr#106. Looking at the [changes in the version bump](xattr/xattr@v0.9.9...v0.10.0), there does not seem to be any significant changes other than shabang xattr/xattr#106. Co-authored-by: Moonsik Park <[email protected]> Co-authored-by: Bartosz Sokorski <[email protected]> tests: add coverage to `poetry install` update lockfile. [pre-commit.ci] pre-commit autoupdate updates: - [github.com/asottile/pyupgrade: v3.2.0 → v3.2.2](asottile/pyupgrade@v3.2.0...v3.2.2) - [github.com/hadialqattan/pycln: v2.1.1 → v2.1.2](hadialqattan/pycln@v2.1.1...v2.1.2)
update lockfile. pip install --no-input everywhere (python-poetry#6966) This is an extension of python-poetry#6724. I think `pip install` invoked by poetry should never ask for user input. Motivation is that it happened to myself and a number of colleagues many times that poetry got seemingly stuck while it was just waiting for a user input because of a private pypi repository that needed authentication. I hope this is a valuable contribution to a tool I like a lot and would like to use more and more :) docs: update Windows cache path to match 1.2 Bump `xattr` version to `0.10.0`. (python-poetry#7005) Resolves: python-poetry#6928 <!-- This is just a reminder about the most common mistakes. Please make sure that you tick all *appropriate* boxes. But please read our [contribution guide](https://python-poetry.org/docs/contributing/) at least once, it will save you unnecessary review cycles! --> - [ ] Added **tests** for changed code. - [ ] Updated **documentation** for changed code. <!-- If you have *any* questions to *any* of the points above, just **submit and ask**! This checklist is here to *help* you, not to deter you from contributing! --> Bump `xattr` version to `0.10.0`. This fixes python-poetry#6891, which is not a problem with the user's environment as suggested by the maintainer of xattr at xattr/xattr#108, but in fact the problem of the package which was fixed by xattr/xattr#106. Looking at the [changes in the version bump](xattr/xattr@v0.9.9...v0.10.0), there does not seem to be any significant changes other than shabang xattr/xattr#106. Co-authored-by: Moonsik Park <[email protected]> Co-authored-by: Bartosz Sokorski <[email protected]> tests: add coverage to `poetry install` update lockfile. [pre-commit.ci] pre-commit autoupdate updates: - [github.com/asottile/pyupgrade: v3.2.0 → v3.2.2](asottile/pyupgrade@v3.2.0...v3.2.2) - [github.com/hadialqattan/pycln: v2.1.1 → v2.1.2](hadialqattan/pycln@v2.1.1...v2.1.2)
update lockfile. pip install --no-input everywhere (python-poetry#6966) This is an extension of python-poetry#6724. I think `pip install` invoked by poetry should never ask for user input. Motivation is that it happened to myself and a number of colleagues many times that poetry got seemingly stuck while it was just waiting for a user input because of a private pypi repository that needed authentication. I hope this is a valuable contribution to a tool I like a lot and would like to use more and more :) docs: update Windows cache path to match 1.2 Bump `xattr` version to `0.10.0`. (python-poetry#7005) Resolves: python-poetry#6928 <!-- This is just a reminder about the most common mistakes. Please make sure that you tick all *appropriate* boxes. But please read our [contribution guide](https://python-poetry.org/docs/contributing/) at least once, it will save you unnecessary review cycles! --> - [ ] Added **tests** for changed code. - [ ] Updated **documentation** for changed code. <!-- If you have *any* questions to *any* of the points above, just **submit and ask**! This checklist is here to *help* you, not to deter you from contributing! --> Bump `xattr` version to `0.10.0`. This fixes python-poetry#6891, which is not a problem with the user's environment as suggested by the maintainer of xattr at xattr/xattr#108, but in fact the problem of the package which was fixed by xattr/xattr#106. Looking at the [changes in the version bump](xattr/xattr@v0.9.9...v0.10.0), there does not seem to be any significant changes other than shabang xattr/xattr#106. Co-authored-by: Moonsik Park <[email protected]> Co-authored-by: Bartosz Sokorski <[email protected]> tests: add coverage to `poetry install` update lockfile. [pre-commit.ci] pre-commit autoupdate updates: - [github.com/asottile/pyupgrade: v3.2.0 → v3.2.2](asottile/pyupgrade@v3.2.0...v3.2.2) - [github.com/hadialqattan/pycln: v2.1.1 → v2.1.2](hadialqattan/pycln@v2.1.1...v2.1.2) update lockfile. update lockfile.
I did the following on my Intel Mac which seems to get around this problem:
|
I encountered the same issue on an M1 Mac with a fairly recently installation of Poetry. Reinstalling Uninstalling and reinstalling poetry (as per https://python-poetry.org/docs/) got everything working. Thanks for your hard work on this excellent package! |
I've just rerun the code to install poetry and it fixed. From official docs:
|
I am using python 3.12 on an M2 MBA (Sonoma) and still regularly getting this issue. I tried lots of things to no avail, including:
Steps to reproduce:
I also tried install poetry via |
I am using poetry on M1 mac os Sonoma. Tried reinstalling poetry, xattr, cffi as well as my entire python environment but python -c "import xattr" still fails: I am using xattr 0.10.1 During handling of the above exception, another exception occurred:
Please help To recreate this
I have raised an issue on xattr but it was mentioned the poetry may be the issue. Please help. |
I tried reinstalling poetry, pyenv, creating new env, install poetry using pipx, poetry install using script, pip install etc. Nothing worked |
xattr just got an new release (7 hours ago as of right now), I'll try to check if that fixes things for me later, but maybe it helps someone here in the mean time. |
@phdowling let us know if new xattr fixed your issue. I am unable to install it |
Sonoma, M1 Commands(considering pyenv installed):
In case you want to create poetry environment with python3.10
In case you want to create poetry environment with python3.12
|
I believe I was seeing this while switching between Python versions (e.g. 3.8 and 3.11) in a project, and re-running I needed to re-run I'm not 100% sure that's the whole story, as I believe I originally tried |
@MBARIMike saved me. ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
poetry 1.7.1 requires xattr<0.11.0,>=0.10.0; sys_platform == "darwin", but you have xattr 1.0.0 which is incompatible. so I did this and success: pip3 uninstall xattr
pip3 install xattr==0.10.1 |
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. |
Poetry (version 1.2.2)
Python 3.8.14
macOS 12.6
-vvv
option) and have included the output below. https://gist.github.com/Chichilele/d8a01dd80b82d6a20e122f990e35cdceIssue
The
xattr/lib_build.h
file doesn't exist. Could there be a problem with the dependencies?The same problem with the following libraries:
but works with:
So it clearly seems to be related to packages that require a build/compilation.
The text was updated successfully, but these errors were encountered: