当前位置:网站首页>【杂】pip换国内源教程及国内源地址
【杂】pip换国内源教程及国内源地址
2022-08-02 06:43:00 【Fannnnf】
国内镜像地址
阿里云:https://mirrors.aliyun.com/pypi/simple/
清华大学:https://pypi.tuna.tsinghua.edu.cn/simple
豆瓣:https://pypi.douban.com/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
华中理工大学:https://pypi.hustunique.com/
山东理工大学:https://pypi.sdutlinux.org/
PS:如果地址报错可以换http试试
安装时临时换源
使用pip install -i 镜像链接 库名
例如:pip install -i http://mirrors.aliyun.com/pypi/simple/ numpy
永久换源
1. Linux
修改 ~/.pip/pip.conf (没有就创建一个文件夹及文件。文件夹要加“.”,表示是隐藏文件夹)
另外,树莓派(linux也可参考)配置方法可参考https://blog.csdn.net/qq_44214671/article/details/111008427
2. Windows
- 在文件资源管理器中输入
%appdata%
进入Roaming
文件夹 - 找到
pip
文件夹,如果没有就创建一个,进入该文件夹 - 找到
pip.ini
文件,如果没有就创建一个,用记事本打开该文件,将其中的内容替换为以下内容(镜像地址可以自己更换)
[global]
index-url = http://pypi.douban.com/simple
[install]
use-mirrors =true
mirrors =http://pypi.douban.com/simple/
trusted-host =pypi.douban.com
- 保存后关闭即可
边栏推荐
猜你喜欢
随机推荐
.NET Static Code Weaving - Rougamo Release 1.1.0
.NET静态代码织入——肉夹馍(Rougamo) 发布1.1.0
LeetCode Algorithm 1374. 生成每种字符都是奇数个的字符串
张驰课堂:六西格玛培训工具——箱线图
“蔚来杯“2022牛客暑期多校训练营4,签到题NDKHL
正则表达式的理解学习
_2_顺序表
张驰课堂:六西格玛测量系统的误差分析与判定
See the picture to understand | How to choose sales indicators to measure the health of business growth
About the local server problem after ue4.27 pixel streaming package
Connection reset by peer 问题解析
[Dataset][VOC] Eyewear dataset 6000 in VOC format
MPLS的相关技术
Gradle系列——Gradle插件(基于Gradle文档7.5)day3-2
Wuhan 2022 organizing of the high-performance computing added new ecological development of high-performance computing
JS初识高阶函数和函数柯里化
2022.07.31(LC_6132_使数组中所有元素都等于零)
jvm 二之 栈帧内部结构
实例031:字母识词
论文《Deep Multifaceted Transformers for Multi-objective Ranking in Large-Scale E-commerce Recommender》