当前位置:   article > 正文

condarc怎么修改_condarc文件找不到的问题【解决办法】

在创建conda环境的时候,需要修改condarc文件的内容。有可能怎么也找不到.condarc

今天爱分享给大家带来condarc文件找不到的问题【解决办法】,希望能够帮助到大家。

在创建conda环境的时候,需要修改condarc文件的内容。一开始怎么也找不到.condarc文件,系统提示也是无法找到该文件。通过查找资源,发现原来.condarc默认是不会自动创建的,只有当用户第一次使用conda config命令时,系统才会自动创建.condarc文件。(有一个专用词,.condarc叫运行期配置文件)

配置.condarc文件

配置conda主要有两种语法,一种是添加,一种是设置

conda config --add [options] [parameters]

conda config --set [options] [yes|no]

添加通道(默认已经包含defaults)

conda config --add channels defaults (会报错显示已经含有defaults)

添加清华镜像的国内通道

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r

添加环境目录envs_dirs

conda config --add envs_dirs [path] (example: /anaconda/envs)

添加pkgs_dirs

conda config --add pkgs_dirs [path] (example: /anaconda/envs)

设置ssl_verify

conda config --set ssl_verify yes

设置show_channel_urls

conda config --set show_channel_urls yes

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/你好赵伟/article/detail/317176
推荐阅读
相关标签
  

闽ICP备14008679号