热门标签 | HotTags
当前位置:  开发笔记 > 后端 > 正文

pip配置国内pypi源

pip安装默认走的是官方的仓库,下载速度很慢,所以需要配置pypi源,才能使用pip进行安装依赖库在windows下需要创建目录C:\Users\username.pip,然后新建

pip安装默认走的是官方的仓库,下载速度很慢,所以需要配置pypi源,才能使用pip进行安装依赖库

在windows下需要创建目录C:\Users\username.pip,然后新建并编辑配置文件

C:\Users\username\.pip\pip.ini

在linux下需要创建目录~/.pip,然后新建并编辑配置文件

vim ~/.pip/pip.conf

pypi源:

1、阿里云pypi源

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

2、豆瓣pypi源(不建议)

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

3、清华pypi源

[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host = pypi.tuna.tsinghua.edu.cn


推荐阅读
author-avatar
刘浩不来丷上海594865126
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有