jetson nano入门(三)tensorflow的安装

Jetson Nano中已经安装了Python3.6

1.首先安装更新pip

sudo apt-get install python3-pip python3-dev
安装后pip是9.01版本,需要把它升级到最新版,升级后会有一个小Bug,需要手动改一下

python3 -m pip install --upgrade pip  
sudo gedit /usr/bin/pip3  

from pip import main
if __name__ == '__main__':
    sys.exit(main())
改成

from pip import __main__
if __name__ == '__main__':
    sys.exit(__main__._main())
修改结束后保存退出即可

2.接下来安装常用的包
sudo apt-get install python3-numpy 
sudo apt-get install python3-scipy
sudo apt-get install python3-pandas
sudo apt-get install python3-matplotlib
sudo apt-get install python3-sklearn

3.安装tensorflow-gpu

安装之前需要安装两项依赖,否则肯定装不上

sudo apt-get install python3-pip libhdf5-serial-dev hdf5-tools

sudo pip3 install -U numpy grpcio absl-py py-cpuinfo psutil portpicker grpcio six mock requests gast h5py astor termcolor

sudo pip3 install --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v42 tensorflow-gpu==1.13.1+nv19.3 --user

到这里大功告成!

最新回复(0)
/jishuHx7omZaklGK3JKNKJUVEQF_2BmQEQnuuKNtgbKDNfjW9g_3D4858167
8 简首页