Home > Backend Development > Python Tutorial > How to Configure Pip with CNTLM for Proxy Access?

How to Configure Pip with CNTLM for Proxy Access?

Susan Sarandon
Release: 2024-11-03 06:06:03
Original
808 people have browsed it

How to Configure Pip with CNTLM for Proxy Access?

Pip Proxy Configuration with CNTLM

Attempting to utilize pip behind a proxy can encounter challenges. While CNTLM is a potential solution, it requires proper configuration.

One method to determine if CNTLM is correctly set up involves executing the command:

cntlm.exe -c cntlm.ini -I -M http://google.com
Copy after login

However, if this command returns an error, it indicates issues with the proxy setup.

An alternative method is to export the https_proxy environment variable with the format:

export https_proxy=http://web-proxy.mydomain.com
Copy after login

Ensure to use https_proxy rather than http_proxy. Subsequently, execute pip with the -E flag to apply the environment variable:

sudo -E pip install somepackage
Copy after login

If successful, this approach should allow pip to access the proxy via https_proxy without requiring explicit proxy configuration in the command.

The above is the detailed content of How to Configure Pip with CNTLM for Proxy Access?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
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
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template