pip 国内源 配置
来源:互联网 发布:mac运行windows 发热 编辑:程序博客网 时间:2024/05/22 04:31
最近使用 pip 安装包,动辄十几 k 甚至几 k 的下载速度,确实让人安装的时候心情十分不好。所以还是要给 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/
- 中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/
可以在安装的时候,直接使用 - i 来指定使用哪个 url,如下图所示:
pip install numpy -i http://pypi.douban.com/simple/
如果提示 host 不被信任可以加上参数 –trusted-host
pip install web.py -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
当然,更简单的做法是建立一个 pip.ini 文件,让 pip 每次安装的时候,使用这个文件内的配置。windows 下这个文件一般是不存在的,需要自己建立。
文件存放的位置如下:
- On Unix the default configuration file is: $HOME/.config/pip/pip.conf which respects the XDG_CONFIG_HOME environment variable.
On macOS the configuration file is $HOME/Library/Application Support/pip/pip.conf.
On Windows the configuration file is %APPDATA%\pip\pip.ini.
pip.ini 里面的内容如下:
[global]index-url = http://pypi.douban.com/simple[install]trusted-host=pypi.douban.com
阅读全文
0 0
- 配置pip国内源
- pip 国内源 配置
- pip 配置使用国内 阿里云/豆瓣 pip源
- pip 配置python国内镜像源
- pip国内源
- python pip 国内源
- pip 国内源提速
- pip国内源
- PIP国内源
- pip更换国内源
- python pip 国内源
- pip 国内源
- [Python] pip国内源
- pip 最新国内源
- 三个国内pip源
- pip 国内源提速
- pip修改为国内源
- Linux更新Pip国内源
- 解决"There is no Action mapped for namespace / and action name ***"的方法
- 小东吖 之 java 抽奖系统
- DedeCMS修改广告代码后前台不更新的解决方法
- freemarker ftl文件在eclipse中像jsp,html一样编辑高亮
- 地形系统
- pip 国内源 配置
- AndroidStudio中修改项目名称
- HelloDNN,多层感知机MLP学习笔记
- 2017-12-10杭电OJ2010 《水仙花数》
- dedecms后台登录成功后,又返回登录界面已成功解决
- AJAX封装
- 织梦DEDECMS后台登录掉线返回
- spring的启动过程——spring和springMVC父子容器的原理
- 颜色空间RGB与HSV(HSL)的转换