python的pip安装超时问题解决
2024-10-21 14:24:33
使用pip install 安装python第三方库时出现了如下错误:
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host=‘files.pythonhosted.org’, port=443): Read timed out.
原因分析:
使用pip下载python第三方库时,由于国内网络的限制,下载速度缓慢,而超过一定时长时,就默认下载失败。
解决方法:
1:延长超时时间
pip3 install --default-timeout=1000 "包的名称"
2:更改下载源
由于默认的国外下载源下载速度十分缓慢,所以可以选择国内的几个比较好的镜像
阿里云 http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple/
豆瓣 http://pypi.doubanio.com/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
使用命令:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple 库名
最新文章
- Msql:Incorrect double value: ''for column 'id' at row 1解决
- idhttp的用法
- javascript基础知识复习一
- 写一个iOS VoIP应用需要知道什么?
- input输入框的各种样式
- 常用的JQuery数字类型验证正则表达式
- Grunt构建工具能做哪些事?
- PHP无锁内存nosql---Yac的实战
- Android Gradle 指定 Module 打包
- goroutine和线程区别
- python学习笔记2_条件循环和其他语句
- indexOf() 使用方法(数组去重)
- webpack打包二进制文件报错
- jsonp 跨域1
- linux添加计划任务
- No.4 selenium学习之路之iframe
- sql语句中处理金额,把分换算成元
- Spring 源码学习(3) —— 增加属性注册编辑器
- 【转】Elasticsearch5.0 安装问题集锦
- (转)Inno Setup入门(五)——添加readme文件