How to use pip on windows behind an authenticating proxy

前端 未结 9 1259
谎友^
谎友^ 2020-11-28 19:23

My computer is running windows behind a proxy on a windows server (using active directory), and I can\'t figure out how to get through it with pip (in python3).

9条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-28 20:18

    I ran into the same issue on windows 7. I managed to get it working by creating a "pip" folder with a "pip.ini" file inside it. I put this folder inside "C:\Users\{my.username}\AppData\Roaming", because according to the Python documentation:

    On Windows the configuration file is %APPDATA%\pip\pip.ini

    In the pip.ini file I have only:

    [global]
    proxy = [proxy address]:[proxy port]
    

    So no username:password. And it is working just fine.

提交回复
热议问题