pytorch的linux環(huán)境搭建

下載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
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

推薦閱讀更多精彩內(nèi)容