欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

【Python】使用pip安装第三方库报错 You should consider upgrading via the ‘python -m pip install --upgrade pip‘

程序员文章站 2022-03-11 15:09:43
一名摸爬滚打的大学生——Liujian【Python】使用pip安装第三方库 例如:numpy 报如下错误You are using pip version 9.0.1, however version 20.2.4 is available.You should consider upgrading via the ‘python -m pip install --upgrade pip’ command.按照提示升级pip出现异常socket.timeout: The read oper....

一名码圈摸爬滚打,成天幻想成为大佬的大学生——Liujian

【Python】pip安装第三方库失败解决方案 例如:pip install numpy 报如下错误
You are using pip version 9.0.1, however version 20.2.4 is available.
You should consider upgrading via the ‘python -m pip install --upgrade pip’ command.

【Python】使用pip安装第三方库报错 You should consider upgrading via the ‘python -m pip install --upgrade pip‘

按照提示升级pip出现异常
socket.timeout: The read operation timed out

解决:
1.使用管理员身份运行命令提示符
2.升级Python pip时指定镜像源(我使用豆瓣镜像源)

python -m pip install --upgrade pip -i  https://pypi.doubanio.com/simple/  --trusted-host pypi.doubanio.com

3.重新安装numpy(可以修改全局镜像源也可以使用pip命令时指定镜像源,我采用指定镜像源方式)

python install numpy -i https://pypi.doubanio.com/simple/  --trusted-host pypi.doubanio.com

4.查看numpy是否安装成功

  • 进入cmd命令窗口输入python,进入python终端命令行,执行命令“import numpy“回车没有报错说明安装成功。
    【Python】使用pip安装第三方库报错 You should consider upgrading via the ‘python -m pip install --upgrade pip‘
  • 使用pip list 安装的第三方库
    【Python】使用pip安装第三方库报错 You should consider upgrading via the ‘python -m pip install --upgrade pip‘

5.IDEA报错无Module情况(前面配置好了就可以使用啦,以下针对IDEA报错小伙伴)

  • 只需要配置与环境变量相同的SDK即可

【Python】使用pip安装第三方库报错 You should consider upgrading via the ‘python -m pip install --upgrade pip‘

【Python】使用pip安装第三方库报错 You should consider upgrading via the ‘python -m pip install --upgrade pip‘
o( ̄▽ ̄)ブ问题解决啦,如果有其他问题欢迎留言讨论~~~

本文地址:https://blog.csdn.net/m0_53129012/article/details/110430873

相关标签: python pip