变更conda源
vim .condarc
changeps1: False
ssl_verify: true
channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
show_channel_urls: true
anaconda pip三方库下载位置
~/opt/anaconda3/lib/python3.9/site-packages
Anaconda 清除旧版本的包
conda clean -a //删除所有没有依托的包以及tar包
conda clean -p //删除没有用的包
conda clean -t //删除tar包
释放老的版本大小为6.4个G。
➜ ~ conda clean -h -a
usage: conda clean [-h] [-a] [-i] [-p] [-t] [-f] [-c [TEMPFILES ...]] [-l] [-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, tarballs, and logfiles.
-i, --index-cache Remove index cache.
-p, --packages Remove unused packages from writable package caches. WARNING: This does not check for packages installed using symlinks back to the package cache.
-t, --tarballs Remove cached package tarballs.
-f, --force-pkgs-dirs
Remove *all* writable package caches. This option is not included with the --all flag. WARNING: This will break environments with packages installed using symlinks back to the
package cache.
-c [TEMPFILES ...], --tempfiles [TEMPFILES ...]
Remove temporary files that could not be deleted earlier due to being in-use. The argument for the --tempfiles flag is a path (or list of paths) to the environment(s) where the
tempfiles should be found and removed.
-l, --logfiles Remove log files.
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 conda programmatically.
-q, --quiet Do not display progress bar.
-v, --verbose Can be used multiple times. Once for INFO, twice for DEBUG, three times for TRACE.
-y, --yes Sets any confirmation values to 'yes' automatically. Users will not be asked to confirm any adding, deleting, backups, etc.
conda commands available from other packages:
doctor - A subcommand that displays environment health report
网友评论