我最近重新安装了它的M1版本,因为我以前错误地使用了它的英特尔版本(我遵循了official guide)。
我有一些项目,使用诗歌,我以前安装在一个conda环境与pip install poetry
。我想在新的conda环境重复这个过程,但我得到以下错误消息:
Building wheels for collected packages: xattr
Building wheel for xattr (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for xattr (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [21 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.9-universal2-cpython-312
creating build/lib.macosx-10.9-universal2-cpython-312/xattr
copying xattr/lib_build.py -> build/lib.macosx-10.9-universal2-cpython-312/xattr
copying xattr/compat.py -> build/lib.macosx-10.9-universal2-cpython-312/xattr
copying xattr/lib.py -> build/lib.macosx-10.9-universal2-cpython-312/xattr
copying xattr/__init__.py -> build/lib.macosx-10.9-universal2-cpython-312/xattr
copying xattr/tool.py -> build/lib.macosx-10.9-universal2-cpython-312/xattr
copying xattr/pyxattr_compat.py -> build/lib.macosx-10.9-universal2-cpython-312/xattr
running build_ext
generating cffi module 'build/temp.macosx-10.9-universal2-cpython-312/_lib.c'
creating build/temp.macosx-10.9-universal2-cpython-312
building '_lib' extension
creating build/temp.macosx-10.9-universal2-cpython-312/build
creating build/temp.macosx-10.9-universal2-cpython-312/build/temp.macosx-10.9-universal2-cpython-312
clang -fno-strict-overflow -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -O3 -Wall -arch arm64 -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12 -c build/temp.macosx-10.9-universal2-cpython-312/_lib.c -o build/temp.macosx-10.9-universal2-cpython-312/build/temp.macosx-10.9-universal2-cpython-312/_lib.o
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
error: command '/usr/bin/clang' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for xattr
Failed to build xattr
ERROR: Could not build wheels for xattr, which is required to install pyproject.toml-based projects
字符串
我在输入python --version
时也得到类似的错误消息:
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
型
但是当我输入python3 --version
时,我得到:
Python 3.12.1
型
会很感激你的帮助。谢谢
1条答案
按热度按时间iswrvxsc1#
第一个错误说你缺少
xcrun
,试着通过运行xcode-select --install
来重新安装xcode,看看是否能解决这个问题。