Python 更换国内pip源
Python,更换,国内,pip
2025-04-01 16:27:53 时间
大家好,又见面了,我是你们的朋友全栈君。
– 豆瓣:http://pypi.douban.com/simple/
– 中科大:https://pypi.mirrors.ustc.edu.cn/simple/
– 清华:https://pypi.tuna.tsinghua.edu.cn/simple
一次性使用
可以在使用pip的时候加参数-i https://pypi.tuna.tsinghua.edu.cn/simple
例如:pip install SomePackage -i https://pypi.tuna.tsinghua.edu.cn/simple
这样就会从清华这边的镜像去安装SomePackage
库。
永久修改,一劳永逸:
- linux下,修改
~/.pip/pip.conf
(没有就创建一个), 修改index-url
为国内镜像地址,内容如下:[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
- windows下,直接在user目录中创建一个pip目录,如:
C:\Users\xx\pip
,新建文件pip.ini
,内容如下[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/136227.html原文链接:https://javaforall.cn
相关文章
- 手把手教你用Python破解邻家小妹wifi密码
- Python/GUI/tkinter/学生信息管理系统源码
- python调试工具ipdb基本命令
- python读取modis数据
- Python基础07-函数
- [Python] 使用print作进度条(解决end=''时print不显示的问题)
- python转置矩阵画流程图_python 矩阵转置transpose
- python换行符使用_python中怎么换行?「建议收藏」
- 心情不好的时候,用 Python 画棵樱花树送给自己吧「建议收藏」
- Win10配置Airsim环境并设置Python通信
- Python实现智能停车场车牌识别计费系统
- 【Python矩阵转置】| 试使用多方法实现[通俗易懂]
- CPD 算法实现点云配准(python版本)[通俗易懂]
- Python中break和continue区别「建议收藏」
- python分子化学模拟_#分子模拟#MDTraj分子模拟python包(一)
- Python 命令行工具:Fire (已验证)
- python中矩阵转置4种方法「建议收藏」
- 如何用python画一朵樱花_如何用python绘制粉色樱花
- 快过年了,用Python写副春联&福字送给你~
- python中的各种符号(欢迎补充)