Pip installation tutorials using local sources
This article mainly explains the "pip installation using local source tutorial", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and study the "pip installation using local source tutorial" bar!
Modify vim / root/.pip/pip.conf
Change to [global]
# index-url= http://mirrors.aliyun.com/pypi/simple/
Index-url= https://pypi.doubanio.com/simple/
[install]
Trusted-host=mirrors.aliyun.com
# trusted-host=mirrors.cloud.aliyuncs.com
Pipy domestic images are available:
Http://pypi.douban.com/ Douban
Http://pypi.hustunique.com/ Huazhong University of Science and Technology
Http://pypi.sdutlinux.org/ Shandong University of Technology
Http://pypi.mirrors.ustc.edu.cn/ University of Science and Technology of China
Using the mirror method, you can add the parameter "- I http://e.pypi.python.org/simple"" to each pip execution.
Or you can configure it locally, so you don't have to add parameters every time.
Users using pip can be configured as follows:
In unix and macos, the configuration file is: $HOME/.pip/pip.conf
On windows, the configuration file is:% HOME%\ pip\ pip.ini
You need to add to the configuration file:
[global]
Index-url= http://pypi.douban.com/simple
In the new version, the following error will be reported on mirrors that are not transmitted by https:
This repository located at pypi.douban.com is not a trusted host, if this repository is available via HTTPS it is recommend to use HTTPS instead, otherwise you may silence this warning with'- trusted-host pypi.douban.com'.
DEPRECATION: Implicitly allowing locations which are not hosted at a secure origin is deprecated and will require the use of-trusted-host in the future.
Requirement already up-to-date: pip in / usr/lib/python2.7/site-packages
The solution is:
Edit $HOME/.pip/pip.conf
[global]
Trusted-host=pypi.douban.com
Index-url= http://pypi.douban.com/simple/
Thank you for reading, the above is the "pip installation using local source tutorials" content, after the study of this article, I believe you have a deeper understanding of the pip installation of local source tutorials, the specific use of the need for you to practice verification. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!