Using pip behind a proxy with CNTLM

前端 未结 30 2519
囚心锁ツ
囚心锁ツ 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:42

    I am also no expert in this but I made it work by setting the all_proxy variable in the ~/.bashrc file. To open ~/.bashrc file and edit it from a terminal run following commands,

    gedit ~/.bashrc &
    

    Add following at the end of file,

    export all_proxy="http://x.y.z.w:port"
    

    Then either open a new terminal or run following in the same terminal,

    source ~/.bashrc
    

    Just setting http_proxy and https_proxy variables aren't enough for simple usage pip install somepackage. Though somehow sudo -E pip install somepackage works, but this have given me some problem in case I am using a local installation of Anaconda in my users' folder.

    P.S. - I am using Ubuntu 16.04.

提交回复
热议问题