aarch64上部署python3.7环境
## 系统级别环境 sudo apt-get install python3.7-dev sudo apt-get install python3-pip python3.7 -m pip install --upgrade pip # 解码加速包,不同的环境可能会build失败 # 1.1 ubuntu安装libjpeg-turbo-2.1.4.tar.gz # 1.2 安装py包 python3.7 -m pip install PyTurboJPEG ## python包 python3.7 -m pip install opencv-python==4.4.0.40 python3.7 -m pip install tqdm python3.7 -m pip install numpy python3.7 -m pip install faiss-cpu python3.7 -m pip install pandas python3.7 -m pip install scipy python3.7 -m pip install onnx python3.7 -m pip install onnxruntime ## 推理引擎类型 #python3.7 -m pip install mnn python3.7 -m pip install ncnn==1.0.20220729 python3.7 -m pip install rknn_toolkit_lite2-1.3.0-cp37-cp37m-linux_aarch64.whl python3.7 -m pip install pycryptodome python3.7 -m pip install arrow python3.7 -m pip install memory_profiler python3.7 -m pip install joblib python3.7 -m pip install flask python3.7 -m pip install psutil # 编译py包 python3.7 -m pip install pycrypto python3.7 -m pip install Cython
# 1.1 或者先离线下载再本地安装
sudo mkdir -p ./whl && sudo chmod 777 -R ./whl && cd ./whl && \ python3.7 -m pip download opencv-python -d ./ -i https://pypi.tuna.tsinghua.edu.cn/simple && \ python3.7 -m pip download tqdm -d ./ -i https://pypi.tuna.tsinghua.edu.cn/simple && \ python3.7 -m pip download faiss-cpu -d ./ -i https://pypi.tuna.tsinghua.edu.cn/simple && \ python3.7 -m pip download pandas -d ./ -i https://pypi.tuna.tsinghua.edu.cn/simple && \ python3.7 -m pip download scipy -d ./ -i https://pypi.tuna.tsinghua.edu.cn/simple && \ python3.7 -m pip download ncnn==1.0.20220729 -d ./ -i https://pypi.tuna.tsinghua.edu.cn/simple && \ python3.7 -m pip download pycryptodome -d ./ -i https://pypi.tuna.tsinghua.edu.cn/simple && \ python3.7 -m pip download arrow -d ./ -i https://pypi.tuna.tsinghua.edu.cn/simple && \ python3.7 -m pip download memory_profiler -d ./ -i https://pypi.tuna.tsinghua.edu.cn/simple && \ python3.7 -m pip download joblib -d ./ -i https://pypi.tuna.tsinghua.edu.cn/simple && \ python3.7 -m pip download flask -d ./ -i https://pypi.tuna.tsinghua.edu.cn/simple && \ python3.7 -m pip download psutil -d ./ -i https://pypi.tuna.tsinghua.edu.cn/simple && \ python3.7 -m pip download pycrypto -d ./ -i https://pypi.tuna.tsinghua.edu.cn/simple && \ python3.7 -m pip download Cython -d ./ -i https://pypi.tuna.tsinghua.edu.cn/simple && \ echo 'done.'
# 1.2 离线安装
# -*- coding: utf-8 -*- # @Time : 2022/11/22 21:05 """ python3.7 install_whl.py """ import os if __name__ == '__main__': _path = './whl' _cmd = 'python3.7 -m pip install ./whl/@ --no-index --find-links=./whl' for whl in os.listdir(_path): _cmd1 = _cmd.replace('@', whl) os.system(_cmd1)