一、遇到的問題: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 就是對的