Solve the problem of pip installation module timeout under windows
Recently, when I was learning the flask framework, the following error occurred when installing flask-sqlalchemy:
The error message is that the https connection timed out. Due to well-known reasons, domestic access to pypi.python.org is very slow.
Solution: 1, create a pip configuration file in the home directory
Create and edit the pip.ini file by adding the following three lines:
[global] timeout = 6000index-url = http://pypi.douban.com/simpletrusted-host = pypi.douban.com
The mirror address of Douban is used here. Just modify and save it.
Install flask-sqlalchemy again
You can see the speed of the Internet, .
The PS:Linux system needs to create a .pip folder and a pip.conf file in the home directory, such as ~ / .pip / pip.conf, the contents of which are the same as above.
2. Use the-I parameter (pip install-- help)-I,-- index-url Base URL of Python Package Index (default https://pypi.python.org/simple).) when installing the module with pip This should point to a repository compliant with PEP 503 (the simple repository API) or a local directory laid out in the same format.
The usage is as follows:
Pip install-I https://pypi.doubanio.com/simple/ flask-sqlalchemy