在tx2上安裝python numba 一直報錯, 看了個大佬的博客安好了, 這裏趕緊在tx2寫個記錄個筆記下來, 所以是繁體, 這輸入法很難受
step1:
numba安装需要依赖包llvmlite,llvmlite又需要安装llvm:
sudo apt-get install llvm-3.9
step2:
下載llvmlite:
# pip2 or pip3
pip install llvmlite == 0.16.0
終端顯示llvmlite的地址, 我這裏是, 也可以下載的:
wget https://mirrors.aliyun.com/pypi/packages/23/c7/56d7c18564783f33206b3cb6ce861a8d681e8be1a124c5651145ce5aad0f/llvmlite-0.16.0.tar.gz
step3:
解壓並進入tar 包:
tar -zxvf llvmlite-0.16.0.tar.gz
cd llvmlite-0.16.0
step4:
安裝llvmlite:
sudo LLVM_CONFIG=/usr/bin/llvm-config-3.9 python setup.py install
或者:
sudo LLVM_CONFIG=/usr/bin/llvm-config-3.9 pip install llvmlite==0.16.0
其中 LLVM_CONFIG 參數就是爲了指定路徑的, 好讓pip安裝包能找到它
step5:
安裝numba:
# pip2 or pip3 根據自己情況而定
sudo LLVM_CONFIG=/usr/bin/llvm-config-3.9 pip install numba==0.31
step6:
pip list numba
參考文獻:
完全參考的他的文章, 親測有效!
https://blog.youkuaiyun.com/benchuspx/article/details/109152810