How do I install the current version (0.30.1) of numba for Python 3 on Ubuntu 16.04 LTS? My version of Python is 3.5.2, and I have a barebones install of Ubuntu (server edition I think)
解决方案
Okay so after a couple of hours of figuring things out, I've decided that this is painful enough to share and not let others figure out.
First, set up the basics: install Python 3, Git and g++
sudo apt install python3 git g++
Then get python3 packages PyPI (aka pip) and NumPy
sudo apt python3-pip
pip3 install numpy
Before we start, decide now if you want Anaconda now: it makes it a LOT easier, and you DO get the latest version of numba (however I don't know if you need to install dependencies before installing numba through Anaconda).
Okay, now let's get started
First add the LLVM 3.9 repositories to apt, and download LLVM
wget -O - .gpg.key | sudo apt-key add -
sudo echo "deb / llvm-toolchain-xenial-3.9 main" >> /etc/apt/sources.list
sudo echo "deb-src / llvm-toolchain-xenial-3.9 main" >> /etc/apt/sources.list
sudo apt update
sudo apt install clang-3.9 llvm-3.9-dev
Now get a couple of extra libraries from apt
sudo apt install zlib1g zlib1g-dev
Add LLVM's config binary to the environment path for all users:
sudo echo 'LLVM_CONFIG="/usr/lib/llvm-3.9/bin/llvm-config"' >> /etc/environment
Now let's get, build and install llvmlite 0.15.0 (replace ~ with your repo directory of choice: an llvmlite folder will be created automatically under it)
cd ~
git clone
cd llvmlite
python3 setup.py build
python3 setup.py install
Above is where any failues will occur: hopefully all goes well (comment with issues).
Finally, install numba!
pip3 install numba
本文发布于:2024-02-02 13:42:16,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/170685253744180.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |