【python】包管理工具pip的国内源站点使用
2017-11-28 21:33
681 查看
注:今天在使用pip安装第三方包时,第一次遇到无法连接到pypi.python.org 站点,即包的来源。
CMD下执行ping pypi.python.org
后发现丢包率特别大,而且我发现这个这个网站貌似不是国内的网站,然后我就去找了找国内有没有pip站点,找了一下果然有,如下:
阿里云 http://mirrors.aliyun.com/pypi/simple
中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple
豆瓣(douban) http://pypi.douban.com/simple
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple
使用方法:
在pip下,执行以下命令,如下载request包
pip install request -i https://pypi.tuna.tsinghua.edu.cn/simple
会发现,网速果然比一起啊快了好多
如果出现这是未信任的源,修改上述命令,如下:
pip install request -i https://pypi.tuna.tsinghua.edu.cn/simple
- -trusted-host pypi.tuna.tsinghua.edu.cn
如果想使用其为默认源
windows下可修改%HOMEPATH%\pip\pip.ini文件
修改内容为:
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host=pypi.tuna.tsinghua.edu.cn
解决了痛点,标记一下,供大家使用!
CMD下执行ping pypi.python.org
后发现丢包率特别大,而且我发现这个这个网站貌似不是国内的网站,然后我就去找了找国内有没有pip站点,找了一下果然有,如下:
阿里云 http://mirrors.aliyun.com/pypi/simple
中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple
豆瓣(douban) http://pypi.douban.com/simple
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple
使用方法:
在pip下,执行以下命令,如下载request包
pip install request -i https://pypi.tuna.tsinghua.edu.cn/simple
会发现,网速果然比一起啊快了好多
如果出现这是未信任的源,修改上述命令,如下:
pip install request -i https://pypi.tuna.tsinghua.edu.cn/simple
- -trusted-host pypi.tuna.tsinghua.edu.cn
如果想使用其为默认源
windows下可修改%HOMEPATH%\pip\pip.ini文件
修改内容为:
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host=pypi.tuna.tsinghua.edu.cn
解决了痛点,标记一下,供大家使用!
相关文章推荐
- Python的包管理工具pip的安装与使用
- CentOS 下使用安装 python 包管理工具 pip
- windows 下python包管理工具pip的安装与使用
- Python的包管理工具pip的安装与使用
- python包管理工具pip安装及使用
- 在Win7下正确使用Python自带的pip管理工具下载
- CentOS中Python pip包管理工具的安装和使用
- Python的包管理工具pip的安装与使用
- Python的包管理工具pip的安装与使用
- Python的包管理工具--PIP安装使用
- Python linux 上的管理工具 pyenv 安装, pip 使用, python项目(版本分割, 项目分割, 虚拟环境创建)
- Python包管理工具pip的基本使用
- 【编程语言】Python 使用包管理工具pip安装模块numpy、scipy、matplotlib以及scikit-learn CentOS 7
- python软件包管理工具pip的简单使用和说明
- python 通过国内镜像使用pip安装工具包
- $python包管理工具pip的安装和使用
- Python的包管理工具pip的安装与使用
- python 包管理工具pip安装与使用
- CentOS中Python pip包管理工具的安装和使用
- CentOS中Python pip包管理工具的安装和使用