"If a worker wants to do his job well, he must first sharpen his tools." - Confucius, "The Analects of Confucius. Lu Linggong"
Front page > Programming > How to Configure Pip with CNTLM for Proxy Access?

How to Configure Pip with CNTLM for Proxy Access?

Published on 2024-11-10
Browse:289

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

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.

Latest tutorial More>

Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.

Copyright© 2022 湘ICP备2022001581号-3