Python pip替换为阿里源的方法步骤
作者:叉叉敌 时间:2023-07-19 15:39:23
背景
由于 python 自带的源下载速度非常慢,特别是安装一些库的时候,甚至有时会失败。
pip国内的一些镜像
阿里云 http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣(douban) http://pypi.douban.com/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
替换
首先在 windows 当前用户家的目录下,创建一个 pip 文件夹,然后创建一个pip.ini文件,修改文件内容为如下;
[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host=mirrors.aliyun.com
备注
记得一定是pip.ini,如果没有开后缀的同学,记得把文件后缀打开,再修改文件的后缀为ini即可。
用户家目录为
C:\Users\**** # **** 就是当前登录用户名, 比如登录用户名是Luke, 那么就是C:\Users\Luke
下面是视图:
来源:https://blog.csdn.net/weixin_42514606/article/details/87388638
标签:Python,pip,阿里源
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Django配置kafka消息队列的实现
2023-07-19 00:49:27
Python 离线工作环境搭建的方法步骤
2023-08-30 01:59:21
Python内置方法实现字符串的秘钥加解密(推荐)
2023-10-22 23:45:35
![](https://img.aspxhome.com/file/2023/8/103318_0s.jpg)
Firefox插件推荐:CSS Usage
2009-10-26 18:44:00
![](https://img.aspxhome.com/file/UploadPic/200910/26/cssusage-70s.jpg)
Python中的chr()函数与ord()函数解析
2021-10-21 13:19:26
python画微信表情符的实例代码
2022-01-09 07:06:40
![](https://img.aspxhome.com/file/2023/9/78769_0s.png)
Python使用pygame模块编写俄罗斯方块游戏的代码实例
2021-11-15 02:29:29
![](https://img.aspxhome.com/file/2023/3/69533_0s.png)
linux下安装mysql简单的方法
2024-01-19 21:02:46
python使用plot绘制未来15天气温折线图
2022-11-06 02:09:41
![](https://img.aspxhome.com/file/2023/0/93620_0s.png)
分组字符合并SQL语句 按某字段合并字符串之一(简单合并)
2024-01-24 11:30:20
详解Windows下PyCharm安装Numpy包及无法安装问题解决方案
2021-01-27 11:58:32
![](https://img.aspxhome.com/file/2023/3/99183_0s.png)
Python图像运算之腐蚀与膨胀详解
2023-09-01 19:58:33
![](https://img.aspxhome.com/file/2023/2/114792_0s.png)
详解PHP的引用计数
2023-11-14 18:00:34
python写入文件自动换行问题的方法
2022-06-13 11:28:18
![](https://img.aspxhome.com/file/2023/4/130644_0s.png)
Python对象与json数据的转换问题实例详解
2023-10-27 22:08:39
python线程定时器Timer实现原理解析
2022-01-08 20:25:36
pycharm使用anaconda全过程
2023-07-19 04:57:12
![](https://img.aspxhome.com/file/2023/3/63873_0s.jpg)
Django点赞的实现示例
2022-08-24 20:13:40
![](https://img.aspxhome.com/file/2023/3/118103_0s.png)
python实现电子词典
2023-05-14 00:29:01
用Python 执行cmd命令
2022-06-08 15:29:17