Home > Article > Backend Development > How do I use CNTLM to access pip behind a workplace proxy?
PIP Proxy Connectivity with CNTLM
To access pip behind a workplace proxy using CNTLM, users may encounter issues with the --proxy option. However, leveraging environment variables offers a reliable solution.
CNTLM configuration verification can be achieved by running "cntlm.exe -c cntlm.ini -I -M http://google.com." If the connection to the proxy fails, cntlm.ini should be re-examined for proper setup.
To bypass the issue, export the "https_proxy" environment variable as follows:
export https_proxy=http://web-proxy.mydomain.com
Subsequently, execute pip commands using:
sudo -E pip install somepackage
By setting the appropriate environment variable, users can successfully establish a connection through the proxy and utilize pip as intended.
The above is the detailed content of How do I use CNTLM to access pip behind a workplace proxy?. For more information, please follow other related articles on the PHP Chinese website!