Open xingchenshanyao opened 1 year ago
2.创建虚拟环境 新建终端,输入
conda create -n [your-name] python=3.8
3.安装torch 在下载文件夹中新建终端,激活虚拟环境,输入
conda activate [your-name]
安装torch
pip install torch-2.0.0+cu118-cp38-cp38-linux_x86_64.whl
安装torchvision
pip install torchvision-0.15.0+cu118-cp38-cp38-linux_x86_64.whl
下面是一些附加内容,可以先不管(对师弟师妹们说的) 4.安装一系列module 建议先换清华源以及开VPN
pip install matplotlib
pip install scipy
pip install opencv-python
pip install tqdm
pip install tensorboard
pip install pillow
pip install h5py
默认安装最新版,罗列一下此时各module的版本
matplotlib==3.7.1
scipy==1.10.1
opencv-python==4.7.0.72
tqdm==4.65.0
tensorboard==2.12.2
pillow==9.5.0
h5py==3.8.0
pip uninstall numpy
pip install numpy==1.20.0
6.最简单的方法: 从相同配置的电脑里拷贝粘贴即可:
根据cuda11.8版本,python采用3.8版本,linux系统,选择下载以下torch和torchvision版本安装包