程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Installing Python package under arm64 architecture

編輯:Python

ARM64 Installation under architecture Python package

Recently, the company's products and models are suitable for domestic servers , Recorded in the ARM64 Installation on server Python package The process of . Installed Python package contain :
(1)tensorflow == 1.14.0
(2)Numpy
(3)scipy
(4)scikit-learn
(5)gensim
(6)Keras
(7)h5py
This installation is mainly online package, stay numpy,tensorflow,scipy,scikit-learn,gensim There will be errors in the process of package .

install h5py

In the installation tensorflow When , need h5py.h5py stay arm64 Errors occur during installation , If something goes wrong , Try the following :

sudo apt-get install libhdf5-dev
sudo apt install cython3
pip3 install h5py

install Tensorflow

install tensorflow When , Install first h5py,numpy etc. package. Here you need to download arm64 Of tensorflow package , Download at https://github.com/lhelontra/tensorflow-on-arm/releases, Download the required version of tensorflow, The installation method is

 pip3 install xxx

If... Is used in the code tensorflow.contrib This module , There may be a mistake , If you make a mistake , Modify the installation dependency package directory tensorflow/contrib Of __init__.py, For example, enter the directory xxx/python3.6/dist-packages/tensorflow/contrib, modify __init__.py, Change to the following code :

if os.name != "nt" and platform.machine() != "s390x":
try:
from tensorflow.contrib import cloud
except ImportError:
pass

install scipy

install scipy You may report an error when you do , If you make a mistake , Install in the following way :
(1) Install first gfortran,libopenblas-dev,liblapack-dev, The installation command is as follows :

sudo apt-get install gfortran libopenblas-dev liblapack-dev

(2) install scipy

 pip3 install scipy

install scikit-learn

install scikit-learn When , Install first numpy,scipy. If there is an installation error , Install as described above scipy.

install gensim

Install first numpy,scipy,six modular , Install again gensim. If installed scipy and six error , Install in the above way .

This document is just for arm64 Installation records under the architecture , If there is a mistake , Welcome to correct . Hope to install the server that is trying to be made in China python Bao's friends , Help .


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved