该方法可用于pip install 库的拒绝访问问题
参考资料:https://www.cnblogs.com/liaojiafa/p/5100550.html
C:\Program Files\Python35\Scripts>pip install requests
Collecting requests
Using cached requests-2.18.4-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests)
Using cached certifi-2017.11.5-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2 (from requests)
Using cached chardet-3.0.4-py2.py3-none-any.whl
Collecting urllib3<1.23,>=1.21.1 (from requests)
Using cached urllib3-1.22-py2.py3-none-any.whl
Collecting idna<2.7,>=2.5 (from requests)
Using cached idna-2.6-py2.py3-none-any.whl
Installing collected packages: certifi, chardet, urllib3, idna, requests
Exception:
Traceback (most recent call last):
File "c:\program files\python35\lib\site-packages\pip\basecomma