How to make Anaconda work behind HTTP proxy (not https)?

前端 未结 7 2081
攒了一身酷
攒了一身酷 2020-12-14 18:42

I\'m having trouble working with Anaconda behind a proxy at work.

When I have have the following environment variables:

http_proxy: http://domain\\us         


        
7条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-14 19:22

    The below worked for me to permanently set my proxies for Anaconda:

    Go to C:/ProgramData/Anaconda3/etc/

    If it doesn’t already have a conda folder, create it.

    If it doesn’t already have the folders activate.d and deactive.d, create them.

    Also create env_vars.bat in both folders. Your end structure should look like the snapshot below:

    In env_vars.bat in activate.d, paste the following (change it to your own proxies):

    set HTTP_PROXY=http://xx.xx.x.xx:xxxx/
    set FTP_PROXY=http://xx.xx.x.xx:xxxx/
    set HTTPS_PROXY=https://xx.xx.xxx.xx:xxxx/
    

    In env_vars.bat in deactivate.d, paste the following (leave the variables blank):

    set HTTP_PROXY=
    set FTP_PROXY=
    set HTTPS_PROXY=
    

    Close and reopen your Anaconda Prompt to activate the changes.

提交回复
热议问题