赞
踩
首先从Github下载安装包:
tensorflow-on-arm
选择合适的版本,例如tensorflow-1.14.0-cp35-none-linux_aarch64.whl
cp35
代表python3.5
,aarch64
表示架构信息wget https://github.com/lhelontra/tensorflow-on-arm/releases/download/v1.14.0/tensorflow-1.14.0-cp35-none-linux_aarch64.whl
pip install tensorflow-1.14.0-cp35-none-linux_aarch64.whl
Note:
ARM64
和aarch64
目前来看是一回事。
我是安装tensorflow-1.14.0-cp35-none-linux_aarch64.whl
遇到如下问题: libhdf5.so: cannot open shared object file: No such file or directory
Loading library to get version: libhdf5.so
error: libhdf5.so: cannot open shared object file: No such file or directory
那么需要安装hdf5
(Ubuntu为例):
sudo apt install pkg-config libhdf5-103 libhdf5-dev
然后就正常了:
Collecting h5py (from keras-applications>=1.0.6->tensorflow==1.14.0)
Using cached https://files.pythonhosted.org/packages/5f/97/a58afbcf40e8abecededd9512978b4e4915374e5b80049af082f49cebe9a/h5py-2.10.0.tar.gz
Requirement already satisfied: markdown>=2.6.8 in /home/ubuntu/.pyenv/versions/3.5.10/envs/yolok210/lib/python3.5/site-packages (from tensorboard<1.15.0,>=1.14.0->tensorflow==1.14.0)
Requirement already satisfied: werkzeug>=0.11.15 in /home/ubuntu/.pyenv/versions/3.5.10/envs/yolok210/lib/python3.5/site-packages (from tensorboard<1.15.0,>=1.14.0->tensorflow==1.14.0)
Requirement already satisfied: setuptools>=41.0.0 in /home/ubuntu/.pyenv/versions/3.5.10/envs/yolok210/lib/python3.5/site-packages (from tensorboard<1.15.0,>=1.14.0->tensorflow==1.14.0)
Requirement already satisfied: importlib-metadata; python_version < "3.8" in /home/ubuntu/.pyenv/versions/3.5.10/envs/yolok210/lib/python3.5/site-packages (from markdown>=2.6.8->tensorboard<1.15.0,>=1.14.0->tensorflow==1.14.0)
Requirement already satisfied: zipp>=0.5 in /home/ubuntu/.pyenv/versions/3.5.10/envs/yolok210/lib/python3.5/site-packages (from importlib-metadata; python_version < "3.8"->markdown>=2.6.8->tensorboard<1.15.0,>=1.14.0->tensorflow==1.14.0)
Building wheels for collected packages: h5py
Running setup.py bdist_wheel for h5py ... done
Stored in directory: /home/ubuntu/.cache/pip/wheels/bd/4f/8e/a608fe814bb1b784ca1680e7fac3cc16b4e071a46275997e69
Successfully built h5py
Installing collected packages: h5py, keras-applications, tensorflow
Successfully installed h5py-2.10.0 keras-applications-1.0.8 tensorflow-1.14.0
我是安装tensorflow-2.3.0-cp37-none-linux_aarch64.whl
遇到了这个问题: libraries mkl_rt not found
那么需要安装如下依赖
pip3 install Cython
sudo apt-get install gfortran
sudo apt-get install libopenblas-dev liblapack-dev libatlas-base-dev libblas-dev
然后就OK了
Successfully installed absl-py-1.0.0 astunparse-1.6.3 cachetools-5.0.0 certifi-2021.10.8 charset-normalizer-2.0.12 gast-0.3.3 google-auth-2.6.6 google-auth-oauthlib-0.4.6 google-pasta-0.2.0 grpcio-1.46.0 h5py-2.10.0 idna-3.3 importlib-metadata-4.11.3 keras-preprocessing-1.1.2 markdown-3.3.7 numpy-1.18.5 oauthlib-3.2.0 opt-einsum-3.3.0 protobuf-3.20.1 pyasn1-0.4.8 pyasn1-modules-0.2.8 requests-2.27.1 requests-oauthlib-1.3.1 rsa-4.8 scipy-1.4.1 six-1.16.0 tensorboard-2.9.0 tensorboard-data-server-0.6.1 tensorboard-plugin-wit-1.8.1 tensorflow-2.3.0 tensorflow-estimator-2.3.0 termcolor-1.1.0 typing-extensions-4.2.0 urllib3-1.26.9 werkzeug-2.1.2 wheel-0.37.1 wrapt-1.14.1 zipp-3.8.0
参考:
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。