展开
拓展 关闭
订阅号推广码
GitHub
视频
公告栏 关闭

pip安装依赖失败

  • 报错如下,通过源不能下载,最后警告pip需升级版本
Requirement already satisfied: pip in c:\users\ychen\appdata\local\programs\python\python310\lib\site-packages (22.0.4)
Collecting pip
  Downloading pip-23.3.1-py3-none-any.whl (2.1 MB)
     --- ------------------------------------ 0.2/2.1 MB 6.6 kB/s eta 0:04:49
ERROR: Exception:
Traceback (most recent call last):
  File "C:\Users\ychen\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\urllib3\response.py", line 438, in _error_catcher
// ......
ERROR: Operation cancelled by user
WARNING: You are using pip version 22.0.4; however, version 23.3.1 is available.
You should consider upgrading via the 'C:\Users\ychen\AppData\Local\Programs\Python\Python310\python.exe -m pip install --upgrade pip' command.
  • 更换国内的源
豆瓣:http://pypi.douban.com/simple/
中科大:https://pypi.mirrors.ustc.edu.cn/simple/
清华:https://pypi.tuna.tsinghua.edu.cn/simple/
阿里云:https://mirrors.aliyun.com/pypi/simple/

pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
  • 查看pip的版本
pip list

# 升级
python -m pip install --upgrade pip
posted @ 2023-11-03 16:22  DogLeftover  阅读(157)  评论(0编辑  收藏  举报