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 
原文链接:https://blog.itblood.com/1858.html,转载请注明出处。
0
船长 第二季Part 2 V1.1 AI汉化版[PC+安卓][5.1G] [日系SLG/汉化]
船长 第二季Part 2 V1.1 AI汉化版[PC+安卓][5.1G] [日系SLG/汉化]
6分钟前 有人购买 去瞅瞅看

站点公告

显示验证码
没有账号?注册  忘记密码?