Home >Backend Development >Python Tutorial >How do I use CNTLM to access pip behind a workplace proxy?

How do I use CNTLM to access pip behind a workplace proxy?

DDD
DDDOriginal
2024-11-03 09:47:29484browse

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn