Using pip behind a proxy with CNTLM

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

    At CentOS (actually I think all linux distros are similar) run

    env|grep http_proxy
    

    and

    env|grep https_proxy
    

    check what is the output of those commands (they should contain your proxy addresses).

    If the outputs are empty or have incorrect values, modify them, for ex:

    export http_proxy=http://10.1.1.1:8080
    export https_proxy=http://10.1.1.1:8080
    

    Now try to fetch and install some packages by using pip:

    pip --proxy http://10.1.1.1:8080 install robotframework
    

    and actually I have never met the case when it didn't work. For some systems you need to be a root (sudo is not enough).

提交回复
热议问题