You can use either online installation or offline installation to install the Requests library.
Online installation:
- When installing the Requests library in a proxy environment, open the command prompt and execute the following command:
set https_proxy = proxy server address: proxy server port
If you are not using a proxy environment, skip this step.
- Execute the following command at the command prompt:
pip install requests
Offline installation:
- Download the latest version of requests-X.XX.XX-py3- none-any.whl from the Requests library download page: https://pypi.org/project/requests/#files
- Copy the downloaded installation file to a folder in the offline environment using storage media.
- Open the command prompt, navigate to the folder of the copied installation file, and execute the following command. The X in the command should be the same as the downloaded .whl file.
pip install requests-X.XX.XX-py3-none-any.whl