python - python包的`pip`安装问题
问题描述
我正在尝试安装一个python
名为numba
. 我想安装它python2.7
,所以当我运行时sudo pip2.7 install numba
,它会给出以下消息。谁能让我知道问题是什么?谢谢你。
copying numba/tests/pycc_distutils_usecase/source_module.py -> build/lib.macosx-10.13-intel-2.7/numba/tests/pycc_distutils_usecase
running build_ext
building 'numba._dynfunc' extension
C compiler: cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe
creating build/temp.macosx-10.13-intel-2.7
creating build/temp.macosx-10.13-intel-2.7/numba
compile options: '-I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c'
cc: numba/_dynfuncmod.c
cc -bundle -undefined dynamic_lookup -arch x86_64 -arch i386 -Wl,-F. build/temp.macosx-10.13-intel-2.7/numba/_dynfuncmod.o -o build/lib.macosx-10.13-intel-2.7/numba/_dynfunc.so
ld: in '/usr/local/lib/libunwind.dylib', file was built for x86_64 which is not the architecture being linked (i386): /usr/local/lib/libunwind.dylib for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ld: in '/usr/local/lib/libunwind.dylib', file was built for x86_64 which is not the architecture being linked (i386): /usr/local/lib/libunwind.dylib for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: Command "cc -bundle -undefined dynamic_lookup -arch x86_64 -arch i386 -Wl,-F. build/temp.macosx-10.13-intel-2.7/numba/_dynfuncmod.o -o build/lib.macosx-10.13-intel-2.7/numba/_dynfunc.so" failed with exit status 1
----------------------------------------
Command "/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c "import setuptools,
tokenize;__file__='/private/tmp/pip-build-mt0h4y/numba/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))"
install --record /tmp/pip-yCTE4v-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-mt0h4y/numba
解决方案
这对我有用
env ARCHFLAGS="-arch x86_64" pip install python-binance
推荐阅读
- python - 具有字符串列到整数列表列的数据框
- javascript - 无法使用 React Native 中的对象访问数组中的值
- tcl - 正则表达式匹配输出,而它不应该
- php - 未定义的索引错误 & 没有来自 POST/GET 的输出
- ios - 无法将 Swift 代码导入到 Objective-C 项目
- elasticsearch - ELK 堆栈中的 Logstash 和 filebeat
- reactjs - 有没有办法关闭 LinkedIn 验证器代码?
- python - 从 pandas 数据框列中的 pandas.core.series.Series 中提取日期
- excel - 如何在django中用空格指定列名
- c# - 接口不能隐式转换类型