Anaconda瘦身

编程入门 行业动态 更新时间:2024-10-25 12:25:00

Anaconda<a href=https://www.elefans.com/category/jswz/34/1762953.html style=瘦身"/>

Anaconda瘦身

用了一年的anaconda,存储占用44G,不断出现存储不够的报警。

可以看到有很多库,不同版本的库,这里可以用conda自带的清理命令行来处理一下。

conda clean 命令方参数

$ conda clean -H
usage: conda clean [-h] [-a] [-i] [-l] [-p] [-t] [-f][-c TEMPFILES [TEMPFILES ...]] [-d] [--json] [-q] [-v] [-y]Remove unused packages and caches.Options:optional arguments:-h, --help            Show this help message and exit.Removal Targets:-a, --all             Remove index cache, lock files, unused cache packages,and tarballs.-i, --index-cache     Remove index cache.-l, --lock            Remove all conda lock files.-p, --packages        Remove unused packages from writable package caches.WARNING: This does not check for packages installedusing symlinks back to the package cache.-t, --tarballs        Remove cached package tarballs.-f, --force-pkgs-dirsRemove *all* writable package caches. This option isnot included with the --all flag. WARNING: This willbreak environments with packages installed usingsymlinks back to the package cache.-c TEMPFILES [TEMPFILES ...], --tempfiles TEMPFILES [TEMPFILES ...]Remove temporary files that could not be deletedearlier due to being in-use. Argument is path(s) toprefix(es) where files should be found and removed.Output, Prompt, and Flow Control Options:-d, --dry-run         Only display what would have been done.--json                Report all output as json. Suitable for using condaprogrammatically.-q, --quiet           Do not display progress bar.-v, --verbose         Can be used multiple times. Once for INFO, twice forDEBUG, three times for TRACE.-y, --yes             Do not ask for confirmation.Examples:conda clean --tarballs

删除索引文件,缓存库文件

conda clean --all --dry-run


删除4.83G存储

卸载不用的虚拟环境(重要!)

列出虚拟环境的例子

conda env list

卸载不需要的环境

conda remove -n (要卸载的环境的名字) --all

更多推荐

Anaconda瘦身

本文发布于:2024-02-25 05:02:13,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1697889.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:瘦身   Anaconda

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!