我正在尝试pyarrow在 OSX 11.0.1 上使用 pip3进行安装,并收到错误消息。
我正在使用 Python 3.9,但不确定这是否是问题所在。
这是错误摘要:
ERROR: Command errored out with exit status 1:
command: /usr/local/opt/python@3.9/bin/python3.9 /usr/local/lib/python3.9/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/mk/2fgx_1s96zjd1r9xzhs2ht_00000gn/T/pip-build-env-pev1z3i2/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'cython >= 0.29' 'numpy==1.14.5; python_version<'"'"'3.7'"'"'' 'numpy==1.16.0; python_version>='"'"'3.7'"'"'' setuptools setuptools_scm wheel
cwd: None
Run Code Online (Sandbox Code Playgroud)
这是完整的(很长)错误输出,我不知道如何阅读它以找到问题的根源:https : //pastebin.com/RQcEuwbz
看起来pyarrow可能在 Python 3.9 上有问题,但现在应该已经修复了这些问题?我对接下来要做什么感到有些困惑。
更新:啊,找到了一个 PR 使 pyarrow 与尚未合并的Python 3.9 一起工作- 所以我猜 pyarrow 的 pip 版本不适用于 Python 3.9,这就是问题所在。看起来 PR 尚未合并,因为它不适用于 Windows,但这对我来说并不重要,因为我使用的是 OSX。有没有办法告诉 pip 从 PR 中的版本安装 pyarrow?
从链接的错误日志中可以看到,由于numpy无法安装而导致构建失败。因此,您首先需要获得正在运行的numpy安装,然后才能继续pyarrow。
12 warnings and 1 error generated.
error: Command "clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Inumpy/core/include -Ibuild/src.macosx-10.15-x86_64-3.9/numpy/core/include/numpy -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/usr/local/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python@3.9/3.9.0_1/Frameworks/Python.framework/Versions/3.9/include/python3.9 -Ibuild/src.macosx-10.15-x86_64-3.9/numpy/core/src/common -Ibuild/src.macosx-10.15-x86_64-3.9/numpy/core/src/npymath -Ibuild/src.macosx-10.15-x86_64-3.9/numpy/core/src/common -Ibuild/src.macosx-10.15-x86_64-3.9/numpy/core/src/npymath -c numpy/random/mtrand/mtrand.c -o build/temp.macosx-10.15-x86_64-3.9/numpy/random/mtrand/mtrand.o -MMD -MF build/temp.macosx-10.15-x86_64-3.9/numpy/random/mtrand/mtrand.o.d" failed with exit status 1
Run Code Online (Sandbox Code Playgroud)