Python3.7 offline installation Requests cannot be used normally (reproduced)

https://www.cnblogs.com/mrgavin/p/12291274.html
Python3.7 offline installation Requests cannot be used normally

Continue to move bricks...

Before the Spring Festival, the problem of offline installation of Python library files under the restricted network was overcome, and the portal is as follows:

https://www.cnblogs.com/mrgavin/p/12202214.html

https://www.cnblogs.com/mrgavin/p/12206853.html

Personally, I prefer the second method. I can't say why I like it, as long as it can be successfully installed offline. Friends with a normal network can bypass~

To learn Python interface automated testing, you must install the Requests library, so I downloaded the requests-2.22.0.tar.gz (113.4 kB) file through https://pypi.org/project/requests/#files.

The offline installation method is not explained here. After a crackling operation, I thought the installation was successful. I can’t wait to go to the import requests in Pycharm to verify that I can’t find this library, but I really have installed it!

It turns out that only the Requests library is installed, and its dependencies are not installed synchronously, so enter pip show requests in the CMD command window

Requires: chardet, idna, urllib3, certifi, pass in turn

https://pypi.org/project/chardet/#files

https://pypi.org/project/idna/#files

https://pypi.org/project/urllib3/#files

https://pypi.org/project/certifi/#files

Download the corresponding dependency package, complete it offline, restart Pycharm and try again, and find that the requests module can be imported normally, haha

Guess you like

Origin blog.csdn.net/zw1996/article/details/106183360