anaconda 清除无用的包,节省空间
复制代码
1
2conda --version
复制代码
1
2conda create -n env_name环境名称 python=版本号
复制代码
1
2activate env_name
复制代码
1
2conda deactivate
复制代码
1
2conda env list 显示当前所有环境
复制环境
复制代码
1
2conda create --name new_env_name --clone copied_env_name
删除环境
复制代码
1
2conda remove --name env_name -all
查找包
复制代码
1
2conda serach --full-name package_full_name
–full-name:精确查找
package_full_name 被查找包全名
复制代码
1
2conda search text
模糊查找
复制代码
1
2conda list 当前环境中已安装包
复制代码
1
2conda install --name env_name package_name
复制代码
1
2conda install package_name 在当前环境下安装包
复制代码
1
2pip install package_name 当conda install 无法安装时
复制代码
1
2conda remove --name env_name package_name
复制代码
1
2conda remove package_name 卸载当前环境中的包
复制代码
1
2conda update --all 或 conda upgrade --all
复制代码
1
2conda update package_name 或 conda upgrade package_name
清除conda 里多余的包
复制代码
1
2conda clean -a
复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35(base) C:UsersAdministrator>conda clean -h usage: conda-script.py clean [-h] [-a] [-i] [-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. -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 TEMPFILES [TEMPFILES ...] Remove temporary files that could not be deleted earlier due to being in-use. Argument is path(s) to prefix(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 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 Do not ask for confirmation. Examples: conda clean --tarballs
最后
以上就是懦弱小蚂蚁最近收集整理的关于anaconda 常用命令,清理多余包anaconda 清除无用的包,节省空间的全部内容,更多相关anaconda内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复