Using pip behind a proxy with CNTLM

前端 未结 30 2227
囚心锁ツ
囚心锁ツ 2020-11-22 11:00

I am trying to use pip behind a proxy at work.

One of the answers from this post suggested using CNTLM. I installed and configured it per this other post, but runnin

30条回答
  •  囚心锁ツ
    2020-11-22 11:28

    With Ubuntu I could not get the proxy option to work as advertised – so following command did not work:

    sudo pip --proxy http://web-proxy.mydomain.com install somepackage
    

    But exporting the https_proxy environment variable (note its https_proxy not http_proxy) did the trick:

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

    then

    sudo -E pip install somepackage
    

提交回复
热议问题