一、遇到的问题: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/

 二、解决办法:重新装环境

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 就是对的

如果路径不对

/path/to/conda/envs/myenv/bin/pip install

显示绑定python环境解释器,确保100%包安装到正确位置

 

Logo

电影级数字人,免显卡端渲染SDK,十行代码即可调用,工业级demo免费开源下载!

更多推荐