Python 版本问题整理

AttributeError: module 'setuptools._distutils' has no attribute 'version'

解决办法:

# If you use pip:
pip install setuptools==59.5.0

# For pip3:
pip3 install setuptools==59.5.0

# If you use conda:
conda install setuptools=59.5.0
SystemError: initialization of _internal failed without raising an exception
(原因:numba和numpy的版本不一致导致)

解决办法:

numba:0.53.0 和 numpy:1.20.2 可以
ModuleNotFoundError: No module named 'mmcv._ext'

解决办法:

pip install mmcv-full

RuntimeError: merge_sort: failed to synchronize: cudaErrorIllegalAddress: an illegal memory access was encountered
pytorch版本问题

pip install torch==1.9.1+cu111 torchvision==0.10.1+cu111 torchaudio==0.9.1 -f https://download.pytorch.org/whl/torch_stable.html

猜你喜欢

转载自blog.csdn.net/weixin_43915090/article/details/134709150