sudo apt-get autoremove python2.7 python3.5 python 3.7
sudo apt-get install python3.7 sudo rm /usr/bin/python sudo ln -s /usr/bin/python3.7 /usr/bin/python
wget https://bootstrap.pypa.io/get-pip.py sudo python3.7 ./get-pip.py
下载numpy-1.17.2-cp37-cp37m-linux_armv7l.whl
sudo pip3 uninstall numpy
pip3 install numpy-1.17.2-cp37-cp37m-linux_armv7l.whl
进入python,import numpy
pip3 install torch-1.3.0a0+de394b6-cp37-cp37m-linux_armv7l.whl --user
pip3 install torchvision-0.4.1a0+a263704-cp37-cp37m-linux_armv7l.whl --user
sudo apt-get install libatlas-base-dev sudo apt-get install libjasper-dev sudo apt-get install libqtgui4 sudo apt-get install libqt4-test sudo apt-get install libhdf5-dev
下载opencv_contrib_python-4.0.1.24-cp37-cp37m-linux_armv7l.whl
pip3 install opencv_contrib_python-4.0.1.24-cp37-cp37m-linux_armv7l.whl
通过网页访问,测试import torch是否可以成功。
notebook为5.6.0以下版本,c.NotebookApp.ip = '*',为5.7.0,则设置为c.NotebookApp.ip = '0.0.0.0'
sudo nano /home/pi/.bashrc
增加开机启动脚本
nohup jupyter notebook&