更换pip 镜像

更换pip 镜像

一般情况使用镜像

阿里云镜像

pip install pyserial -i https://mirrors.aliyun.com/pypi/simple --trusted-host=mirrors.aliyun.com

豆瓣镜像

pip install pyserial -i http://pypi.douban.com/simple/ --trusted-host=pypi.douban.com/simple

windows更换pip镜像

打开你电脑的 C:\Users\你个人的用户目录 新建pip文件夹然后在pip文件夹中建立pip.ini
文件右键用记事本打开文件然后在文件中输入

[global] 
index-url = http://mirrors.aliyun.com/pypi/simple/ 
[install] 
trusted-host=mirrors.aliyun.com

ubuntu更换pip镜像

mkdir -p ~/.pip/
touch pip.conf
vim pip.conf

在pip.conf中输入以下内容,保存退出.

[global] 
index-url = http://mirrors.aliyun.com/pypi/simple/ 
[install] 
trusted-host=mirrors.aliyun.com
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。