arm64麒麟安装paddlehub(国产化)

python 版本 3.7

pip install paddlehub

需要 onnx<=0.9,进行源码安装
基础环境:

yum install cmake 
yum install protobuf-compiler protobuf #  libprotoc-dev
yum install make gcc gcc-c++
pip3 install --upgrade cmake==3.23.2
yum install boost
pip3 install pybind11

源码安装onnx:

git clone https://github.com/onnx/onnx.git
cd onnx
git submodule update --init --recursive
python3 setup.py install

error: onnx/third_party/pybind11/detail/common.h:215:10: fatal error: Python.h: No such file or directory

yum -y install python3-devel python-devel # (ubuntu: python-dev)

参考:https://blog.csdn.net/weixin_35757704/article/details/124852304
https://www.csdn.net/tags/Mtjacg3sOTI2LWJsb2cO0O0O.html

import paddlehub as hub
File “/usr/local/lib/python3.7/site-packages/paddlehub/init.py”, line 31, in
from paddlehub import datasets
File “/usr/local/lib/python3.7/site-packages/paddlehub/datasets/init.py”, line 15, in
from paddlehub.datasets.canvas import Canvas
File “/usr/local/lib/python3.7/site-packages/paddlehub/datasets/canvas.py”, line 23, in
from paddlehub.vision.utils import get_img_file
File “/usr/local/lib/python3.7/site-packages/paddlehub/vision/utils.py”, line 18, in
import cv2
File “/usr/local/lib64/python3.7/site-packages/cv2/init.py”, line 181, in
bootstrap()
File “/usr/local/lib64/python3.7/site-packages/cv2/init.py”, line 153, in bootstrap
native_module = importlib.import_module(“cv2”)
File “/usr/lib64/python3.7/importlib/init.py”, line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: libGL.so.1: cannot open shared object file: No such file or directory

yum install mesa-libGL

你可能感兴趣的:(python,arm,paddle)