how to create a .condarc file for Anaconda?

谁都会走 提交于 2019-12-10 06:29: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!


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/29896309/how-to-create-a-condarc-file-for-anaconda

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!