pip install镜像源(更新和换源)

pip install镜像源(更新和换源)

1.pip安装依赖包默认访问的源:

因为服务器架设在国外的缘故,很多时候不好用网速不行,这时候就需要选择国内的一些安装源安装相应的包

c++ 复制代码
https://pypi.Python.org/simple/

2.设置默认源

打开cmd命令行,升级 pip 到最新的版本 (>=10.0.0) 后进行配置:

python 复制代码
#更新pip源
python -m pip install --upgrade pip
#换源    
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

如果您的 pip 默认源的网络连接较差,临时使用本镜像站来升级 pip:

c++ 复制代码
python -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade pip

其他的镜像源网址:

c++ 复制代码
豆瓣						?http://pypi.douban.com/?
中国科学技术大学		    http://pypi.mirrors.ustc.edu.cn/simple/?
清华:					   https://pypi.tuna.tsinghua.edu.cn/simple
阿里云:				  http://mirrors.aliyun.com/pypi/simple/
华中理工大学:				http://pypi.hustunique.com/
山东理工大学:				http://pypi.sdutlinux.org/?
相关推荐
liwulin050615 分钟前
【ESP32-CAM】HELLO WORLD
python
Doris_202339 分钟前
Python条件判断语句 if、elif 、else
前端·后端·python
Doris_202344 分钟前
Python 模式匹配match case
前端·后端·python
这里有鱼汤1 小时前
Python量化实盘踩坑指南:分钟K线没处理好,小心直接亏钱!
后端·python·程序员
大模型真好玩2 小时前
深入浅出LangGraph AI Agent智能体开发教程(五)—LangGraph 数据分析助手智能体项目实战
人工智能·python·mcp
测试老哥2 小时前
Selenium 使用指南
自动化测试·软件测试·python·selenium·测试工具·职场和发展·测试用例
百锦再2 小时前
[特殊字符] Python在CentOS系统执行深度指南
开发语言·python·plotly·django·centos·virtualenv·pygame
张子夜 iiii2 小时前
4步OpenCV-----扫秒身份证号
人工智能·python·opencv·计算机视觉
潮汐退涨月冷风霜3 小时前
数字图像处理(1)OpenCV C++ & Opencv Python显示图像和视频
c++·python·opencv
酷飞飞10 小时前
Python网络与多任务编程:TCP/UDP实战指南
网络·python·tcp/ip