pip install torch各种版本的命令及地址
一、遇到的问题:cuda和torch编译时的版本不一致
在安装mmcv时遇到error
MMCV_WITH_OPS=1 python setup.py develo
RuntimeError: The detected CUDA version (11.3) mismatches the version that was used to compile PyTorch (10.2). Please make sure to use the same CUDA versions.
pytorch版本安装文档:
https://pytorch.org/get-started/locally/
二、解决办法:重新装环境
- 此处主要列出来去哪里找装环境的那串魔法指令
- https://pytorch.org/get-started/previous-versions/ 指令在这里找
pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu113
2.1 防止装错环境
conda acitavte xxx-env
which env # 输出是xxx-env/bin/pip 就是对的