anaconda创建新环境默认在C盘无法更改

anaconda创建新环境默认在C盘无法更改

在 C:\Users\用户名下有一个 .condarc 文件,将其打开,如果没有:
通过在cmd中输入命令

复制代码
conda config --set show_channel_urls yes

然后在自己当前的用户名下就可以找到该文件,生成该文件时再进行修改

复制代码
channels:
  - defaults
show_channel_urls: true
default_channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
custom_channels:
  conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  pytorch-lts: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud

在最后面添加

复制代码
envs_dirs:
  - E://anaconda//anaconda//anaconda3//envs

这个路径根据自己的情况设置,我的anaconda是安装在了 E:\anaconda\anaconda\anaconda3\envs下,因此环境的存放位置就是上面的那个路径。

接下来再重新创建即可

C盘里的可删

相关推荐
Narrastory7 小时前
明日香 - Pytorch 快速入门保姆级教程(一)
人工智能·pytorch·深度学习
Narrastory7 小时前
明日香 - Pytorch 快速入门保姆级教程(二)
人工智能·pytorch·深度学习
阿白的白日梦12 小时前
winget基础管理---更新/修改源为国内源
windows
埃博拉酱4 天前
VS Code Remote SSH 连接 Windows 服务器卡在"下载 VS Code 服务器":prcdn DNS 解析失败的诊断与 BITS 断点续传
windows·ssh·visual studio code
唐宋元明清21885 天前
.NET 本地Db数据库-技术方案选型
windows·c#
加号35 天前
windows系统下mysql多源数据库同步部署
数据库·windows·mysql
tryCbest5 天前
Windows环境下配置pip镜像源
windows·pip
呉師傅5 天前
火狐浏览器报错配置文件缺失如何解决#操作技巧#
运维·网络·windows·电脑
百事牛科技5 天前
保护文档安全:PDF限制功能详解与实操
windows·pdf
一个人旅程~5 天前
如何用命令行把win10/win11设置为长期暂停更新?
linux·windows·经验分享·电脑