Anaconda使用时的小问题

1.Anaconda文件夹越来越大

第一步:通过conda clean -p来删除一些没用的包,这个命令会检查哪些包没有在包缓存中被硬依赖到其他地方,并删除它们
第二步:通过conda clean -t可以将删除conda保存下来的tar包

conda clean -p      //删除没有用的包
conda clean -t      //删除tar包
conda clean -y -all //删除所有的安装包及cache

2.更新,卸载安装包

conda list         #查看已经安装的文件包
conda list  -n xxx       #指定查看xxx虚拟环境下安装的package
conda update xxx   #更新xxx文件包
conda uninstall xxx   #卸载xxx文件包

3.删除环境

conda remove -n xxxx --all   //创建xxxx虚拟环境

4.用了清华源或者其他国内源的话想要恢复默认源的命令:

conda config --remove-key channels

5 .condarc文件配置

  • Q1 .condarc文件在哪里?
  • A1
    • 对于Windows10而言——windows:C:\users\username\
    • 对于Linux而言——/home/username/
    • 没有的话可以新建一个文件,名字就是**.condarc**
  • Q2 .condarc文件如何打开?

  • A2 可以用文本编辑器打开,在WIndows10下一般用记事本打开

  • Q3 .condarc文件如何配置?

  • A3

channels:
  - defaults
  - https://pypi.tuna.tsinghua.edu.cn/simple
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
show_channel_urls: true
 
proxy_servers:
    http: socks5://127.0.0.1:1080
    https: socks5://127.0.0.1:1080
ssl_verify: false
  • 6
    点赞
  • 32
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值