[英]Error installing Numba on OS X
I'm unable to install Numba (via pip) on my OS X system. 我无法在我的OS X系统上安装Numba(通过pip)。
I'm using 我正在使用
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
and also tried 并尝试过
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
but I then 但是我呢
pip install numba
gives 给
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/
I'm stumped about how to proceed (without Conda!) and wonder if there's some simple fix I'm missing. 我很难过如何继续(没有Conda!)并且想知道是否有一些我想念的简单修复。
Here's what worked for me (with Homebrew Python on OS X 10.11.4): 这对我有用(在OS X 10.11.4上使用Homebrew Python):
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
或者你可以使用自制软件:
brew install homebrew/python/numba
The easiest way is to install miniconda than do: 最简单的方法是安装miniconda而不是:
conda install numba
Works perfectly on Mac (and other platforms). 在Mac(和其他平台)上完美运行。
I would recommend to create a new environment first: 我建议先创建一个新环境:
conda create -n my_numba_env
activate it: 激活它:
source activate my_numba_env
and install numba: 并安装numba:
conda install numba
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.