1、更新pip:(还有一个重要前提就是要在activate pytorch里面做改动)

python -m pip install --upgrade pip

或者:pip install --user --upgrade pip

python -m pip install -U pip

2、先卸载numpy(pip uninstall numpy)再安装固定版本的numpy(pip install numpy)

3、关于matplotlib找不到指定模块,那就是把原本matplotlib的版本降低了[71] 

4、关于sklearnscipy找不到指定模块[72] ,那就是把原本的sklearn和scipy卸载再安装指定版本

pip install -U scikit-learn -i https://pypi.tuna.tsinghua.edu.cn/simple

pip install scipy==1.5.4


 [71]pip uninstall matplotlib

pip install matplotlib==3.0.3

实在卸载不了旧版本,那就手动删除吧,然后再安装pip install matplotlib==3.0.3

 [72]https://blog.csdn.net/shliu220506/article/details/112133665

 链接是参考博文,如有侵权或者有错误,指出来我改正吧~

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐