报错:bash: /opt/conda/bin/activate: Permission denied
解决方法:把 activate base换为source activate base 成功!
二、找不到指定torch版本
去官网找旧版本,根据自己的cuda版本以及torch版本选择命令:
Previous PyTorch Versions | PyTorch
ERROR: Could not find a version that satisfies the requirement torch==1.2.0 (from versions: 1.7.0, 1.7.1, 1.8.0, 1.8.1, 1.9.0, 1.9.1, 1.10.0, 1.10.1)
举个栗子:
conda install pytorch==1.5.0 torchvision==0.6.0 cudatoolkit=10.2 -c pytorch
pip install torch==1.4.0 torchvision==0.5.0
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple/