Script file ‘D:\Anaconda3\envs\pytorch\Scripts\pip-script.py’ is not present 解决方法和添加清华镜像源

错误

在cmd中想使用pip install pip -U命令把pip升级到最新的,出现了上面的错误。

解决方法

我的的pytorch是用anaconda安装的,里面创建有虚拟环境pytorch,首先进入该pytorch环境中的Scripts中来,接着运行easy_install pip命令。如图所示:
Script file ‘D:\Anaconda3\envs\pytorch\Scripts\pip-script.py‘ is not present 解决方法
接着把pip升级到最新版本,执行这个命令:pip install pip -U
Script file ‘D:\Anaconda3\envs\pytorch\Scripts\pip-script.py‘ is not present 解决方法
这样就完成了!

然后我又添加了个pip清华的镜像源,执行下面这个命令:
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

这样就把pip的清华源添加进来了,以后使用pip命令安装东西就变得比较快了。

参考:
https://www.cnblogs.com/L521Z/p/11503224.html
https://blog.csdn.net/wls666/article/details/103236219

相关文章:

  • 2021-04-21
  • 2022-12-23
  • 2021-05-26
  • 2022-12-23
  • 2021-08-10
  • 2021-09-23
猜你喜欢
  • 2022-12-23
  • 2021-08-27
  • 2021-04-05
  • 2021-04-13
  • 2022-03-04
  • 2021-11-11
  • 2022-01-28
相关资源
相似解决方案