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
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
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
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!