出现D:\Program Files\Anaconda3\Scripts\pip-script.py‘is not present 错误解决办法

今天在安装对pip的版本进行升级时报错,结果出现下述所示的错误信息:
D:\Program Files\Anaconda3\Scripts\pip-script.py’is not present.

原因是我在安装pycocotools的时候,系统显示Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

然后网上说要更新pip的版本或者是setuptools的版本,然后我pip install --upgrade pip -i http://pypi.douban.com/simple --trusted-host pypi.douban.com时,系统更新pip版本时,uninstall了原来环境的pip,但是新版本的pip又没有安装成功,所有就导致了以上的D:\anaconda\envs\pytorch\Scripts\pip-script.py’ is not present.

所有我们要做的就是重新安装上电脑的pip,网上大部分的说法就是easy_install pip,但是实际操作时我却总是一直卡着很慢,这里首先要带上具体的版本时最好,我现在的最新版本是pip20.2,所有就执行easy_install -U pip==20.2

但是发现虽然能够连接上,但还是很慢,所以考虑去官网直接下好轮子直接安装
轮子地址:清华源https://pypi.tuna.tsinghua.edu.cn/simple
然后到里面找到自己想要的版本的pip

然后下载好,下载轮子特别快,不到1秒吧,以为本来就很小。

然后找到轮子下载好的地址,cmd一路cd过去,然后最后,复制轮子文件名,比如我的是pip-20.2b1-py2.py3-none-any.whl,然后直接在cmd输入easy_install – pip-20.2b1-py2.py3-none-any.whl,不到两秒,完成。

猜你喜欢

转载自blog.csdn.net/Alex_emma/article/details/106435975