windows更新pip

问题描述

今天在使用以下命令时,出现了奇怪的错误:

pip install -e .

错误如下:

Directory '.' is not installable. File 'setup.py' not found.
You are using pip version 9.0.1, however version 23.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

通过查找资料及阅读错误说明,猜测是pip版本过低所致。

按照错误提示运行

python -m pip install --upgrade pip

出现了以下错误,似乎是镜像网站上没有找到合适的下载源。

Cache entry deserialization failed, entry ignored
Could not fetch URL https://pypi.tuna.tsinghua.edu.cn/simple/pip/: There was a problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:748) - skipping 

解决方案

换个下载源继续更新pip:

python -m pip install --upgrade pip -i https://pypi.douban.com/simple

成功安装!

可用以下命令查看当前pip版本:

pip -V

参考链接

【python初级】 windows10上升级pip_windows pip升级_jn10010537的博客-CSDN博客

你可能感兴趣的:(windows,安装,pip)