how to create a .condarc file for Anaconda?

2019-05-08 06:57发布

I am trying to set up a proxy server in Anaconda because my firewall does not allow me to run online commands such as

conda update

I see online that I should create a .condarc file that contains the proxy address. Unfortunately,

  1. I dont know how to create that file (is it a text file?)

  2. and where to put it?! (in which folder? in the Anaconda folder?)

Any help appreciated Thanks!

2条回答
对你真心纯属浪费
2楼-- · 2019-05-08 07:09

There are chances that the .condarc file is hidden as was in my case. I was using Linux Mint (Sarah) and couldn't find the file though later on I found that it was hidden in the home directory and hence when I opted to show hidden files I could find it.

查看更多
Luminary・发光体
3楼-- · 2019-05-08 07:17

It is a text (YAML) file that goes in the home directory, or optionally, the root of the anaconda installation.

The contents should look like

# Proxy settings: http://[username]:[password]@[server]:[port]
proxy_servers:
    http: http://user:pass@corp.com:8080
    https: https://user:pass@corp.com:8080

See http://conda.pydata.org/docs/config.html for more information.

查看更多
登录 后发表回答