下載anaconda, https://repo.anaconda.com/archive/Anaconda3-2022.10-Linux-x86_64.sh
sh Anaconda3-2022.10-Linux-x86_64.sh
安裝完anaconda,配置一下環(huán)境變量
在home/用戶,修改.bashrc
在最下面
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/anaconda3/lib
然后激活
source ~/.bashrc
配置pip源環(huán)境
在home/用戶,下面創(chuàng)建.pip文件夾
底下創(chuàng)建pip.conf
[global]
index-url=http://pypi.douban.com/simple
[install]
use-mirrors=true
mirrors=http://pypi.douban.com/simple
trusted-host=pypi.douban.com
安裝pytorch
pip install torch==1.8.2 torchvision==0.9.2 torchaudio==0.8.2 --extra-index-url https://download.pytorch.org/whl/lts/1.8/cu111
安裝依賴
pip install opencv-python
pip install tensorboard