gpt4 book ai didi

python - 无法在 OS X Yosemite 上显示 `pip install numpy`

转载 作者:行者123 更新时间:2023-11-28 17:39:29 25 4
gpt4 key购买 nike

升级到 OS X Yosemite 后,我无法pip install pandaspip install numpy。这两个命令之前都运行良好。当我运行时

$ pip 安装 numpy

编译过程运行了大约 30 秒,然后我得到了这个:

编译 C 源代码

C compiler: cc -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -arch x86_64 -arch i386 -pipe



creating build/temp.macosx-10.10-intel-2.7/numpy/linalg

creating build/temp.macosx-10.10-intel-2.7/numpy/linalg/lapack_lite

compile options: '-DATLAS_INFO="\"3.9.35\"" -I/opt/local/include -Inumpy/core/include -Ibuild/src.macosx-10.10-intel-2.7/numpy/core/include/numpy -Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -Ibuild/src.macosx-10.10-intel-2.7/numpy/core/src/private -Ibuild/src.macosx-10.10-intel-2.7/numpy/core/src/private -Ibuild/src.macosx-10.10-intel-2.7/numpy/core/src/private -Ibuild/src.macosx-10.10-intel-2.7/numpy/core/src/private -c'

cc: numpy/linalg/lapack_lite/python_xerbla.c

cc: numpy/linalg/lapack_litemodule.c

/usr/local/bin/gfortran -Wall -g -arch x86_64 -Wall -g -undefined dynamic_lookup -bundle build/temp.macosx-10.10-intel-2.7/numpy/linalg/lapack_litemodule.o build/temp.macosx-10.10-intel-2.7/numpy/linalg/lapack_lite/python_xerbla.o -L/opt/local/lib -L/usr/local/Cellar/gcc/4.9.1/lib/gcc/x86_64-apple-darwin14.0.0/4.9.1 -Lbuild/temp.macosx-10.10-intel-2.7 -llapack -lptf77blas -lptcblas -latlas -lgfortran -o build/lib.macosx-10.10-intel-2.7/numpy/linalg/lapack_lite.so

ld: symbol dyld_stub_binding_helper not found, normally in crt1.o/dylib1.o/bundle1.o for architecture x86_64

collect2: error: ld returned 1 exit status

ld: symbol dyld_stub_binding_helper not found, normally in crt1.o/dylib1.o/bundle1.o for architecture x86_64

collect2: error: ld returned 1 exit status

error: Command "/usr/local/bin/gfortran -Wall -g -arch x86_64 -Wall -g -undefined dynamic_lookup -bundle build/temp.macosx-10.10-intel-2.7/numpy/linalg/lapack_litemodule.o build/temp.macosx-10.10-intel-2.7/numpy/linalg/lapack_lite/python_xerbla.o -L/opt/local/lib -L/usr/local/Cellar/gcc/4.9.1/lib/gcc/x86_64-apple-darwin14.0.0/4.9.1 -Lbuild/temp.macosx-10.10-intel-2.7 -llapack -lptf77blas -lptcblas -latlas -lgfortran -o build/lib.macosx-10.10-intel-2.7/numpy/linalg/lapack_lite.so" failed with exit status 1

----------------------------------------
Cleaning up...
Command /Users/admin/.virtualenvs/numpy_env/bin/python -c "import setuptools, tokenize;__file__='/Users/admin/.virtualenvs/numpy_env/build/numpy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/5b/1l8zg39d48d865bktn00qnbr0000gn/T/pip-yQOlkU-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/admin/.virtualenvs/numpy_env/include/site/python2.7 failed with error code 1 in /Users/admin/.virtualenvs/numpy_env/build/numpy
Storing debug log for failure in /var/folders/5b/1l8zg39d48d865bktn00qnbr0000gn/T/tmpuDgjp9

我尝试过升级 Python、重新创建我的 virtualenv、重新启动我的系统以及用头撞 table ,但都无济于事。我还运行了 brew rm gfortran,然后运行了 brew install gcc,但这没有帮助。

最佳答案

someone on twitter的推荐下,我运行了 brew uninstall gcc。这导致 numpy 安装使用 XCode 提供的 gcc。这似乎工作正常。

当 Apple 安装 4.2.1 时,Homebrew 安装 gc 4.9。但是,我不知道根本问题是什么。

关于python - 无法在 OS X Yosemite 上显示 `pip install numpy`,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26653768/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com