acaconda pycharm配置

本文详细介绍了如何配置Anaconda,包括设置默认和自定义镜像源,切换虚拟环境,以及处理包安装问题,重点提到使用阿里云等国内镜像加速包的下载。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

anaconda的配置

anaconda配置镜像

conda config --set show_channel_urls yes
在这里插入图片描述
记事本打开上一步找到的文件,将里面的内容完全替换为如下内容即可
阿里巴巴的源

channels:
  - defaults
show_channel_urls: true
default_channels:
  - http://mirrors.aliyun.com/anaconda/pkgs/main
  - http://mirrors.aliyun.com/anaconda/pkgs/r
  - http://mirrors.aliyun.com/anaconda/pkgs/msys2
custom_channels:
  conda-forge: http://mirrors.aliyun.com/anaconda/cloud
  msys2: http://mirrors.aliyun.com/anaconda/cloud
  bioconda: http://mirrors.aliyun.com/anaconda/cloud
  menpo: http://mirrors.aliyun.com/anaconda/cloud
  pytorch: http://mirrors.aliyun.com/anaconda/cloud
  simpleitk: http://mirrors.aliyun.com/anaconda/cloud


anaconda切换虚拟环境

命令行输入conda env list ,显示现有的环境
在这里插入图片描述
切换到Helloworld环境 conda activate Helloworld

指定源

pip install music21 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
pip install music21 -i https://pypi.tuna.tsinghua.edu.cn/simple/

pip国内的一些镜像
阿里云 http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/
豆瓣 https://pypi.douban.com/simple/
华中理工大学 https://pypi.hustunique.com/simple/
山东理工大学 https://pypi.sdutlinux.org/simple/

如果anaconda包安装不到其他盘,只能装到C盘

在C盘用户中找到.condarc文件,若有该文件则在最后面添加如下:
在这里插入图片描述
更改envs文件夹权限
在这里插入图片描述

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值