在 OS X 上安装 Numba 时出错 [英] Error installing Numba on OS X
本文介绍了在 OS X 上安装 Numba 时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我无法在我的 OS X 系统上安装 Numba(通过 pip).
I'm unable to install Numba (via pip) on my OS X system.
我正在使用
- Python:2.7.11(自制软件)
- 点:8.1.1
- 设置工具:20.6.7
- OS X:10.11.4 (x86_64)
- Xcode:7.3
- Xcode CLT:7.3.0.0.1.1457485338
- Clang:7.3 版本 703
并且已经安装了先决条件(我认为)
and have installed the prerequisites (I think) with
brew install llvm
git clone https://github.com/numba/llvmlite
cd llvmlite
LLVM_CONFIG=/usr/local/opt/llvm/bin/llvm-config python setup.py install
cd ..
rm -rf llvmlite
也试过了
brew install llvm
brew link --force llvm # later: brew unlink llvm
cd /usr/local/Cellar/llvm/X.X.X/include/llvm/Config/ # X.X.X = 3.6.2
ln -s llvm-config.h config.h
然后我
pip install numba
给予
Failed building wheel for llvmlite
Running setup.py clean for llvmlite
Successfully built numba
Failed to build llvmlite
Installing collected packages: llvmlite, numba
Running setup.py install for llvmlite ...
[...]
error: option --single-version-externally-managed not recognized
----------------------------------------
Command "/usr/local/opt/python/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/b6/3rk65h797p7407x7d36sqn9c0000gn/T/pip-build-MY_vtC/llvmlite/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/b6/3rk65h797p7407x7d36sqn9c0000gn/T/pip-yoGGZY-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/b6/3rk65h797p7407x7d36sqn9c0000gn/T/pip-build-MY_vtC/llvmlite/
我对如何继续(没有 Conda!)感到困惑,想知道我是否缺少一些简单的修复方法.
I'm stumped about how to proceed (without Conda!) and wonder if there's some simple fix I'm missing.
推荐答案
这对我有用(在 OS X 10.11.4 上使用 Homebrew Python):
Here's what worked for me (with Homebrew Python on OS X 10.11.4):
brew install homebrew/versions/llvm37 --with-rtti
git clone https://github.com/numba/llvmlite
cd llvmlite
LLVM_CONFIG=/usr/local/Cellar/llvm37/3.7.1/bin/llvm-config-3.7 python setup.py install
LLVM_CONFIG=/usr/local/Cellar/llvm37/3.7.1/bin/llvm-config-3.7 pip install numba
rm -rf llvmlite
这篇关于在 OS X 上安装 Numba 时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文