conda的基本操作
在这一篇文章中,主要收集整理了Anaconda软件中有关conda的指令操作。本篇文章将以conda自带的所有功能开始讲解。一方面是为了能够让我自己更好的了解conda的相关功能,也是为了将学习经验分享给大家。
Conda的完整操作操作
我们首先windows+R后输入cmd
打开命令提示符窗口,如果在安装Anaconda时已经添加到系统的环境变量,那么直接输入:conda
便可得到如下的界面:
conda is a tool for managing and deploying applications, environments and packages.
Options:
positional arguments:
command
clean Remove unused packages and caches.
config Modify configuration values in .condarc. This is modeled
after the git config command. Writes to the user .condarc
file (C:\Users\Administrator\.condarc) by default.
create Create a new conda environment from a list of specified
packages.
help Displays a list of available conda commands and their help
strings.
info Display information about current conda install.
init Initialize conda for shell interaction. [Experimental]
install Installs a list of packages into a specified conda
environment.
list List linked packages in a conda environment.
package Low-level conda package utility. (EXPERIMENTAL)
remove Remove a list of packages from a specified conda environment.
uninstall Alias for conda remove.
run Run an executable in a conda environment. [Experimental]
search Search for packages and display associated information. The
input is a MatchSpec, a query language for conda packages.
See examples below.
update Updates conda packages to the latest compatible version.
upgrade Alias for conda update.
optional arguments:
-h, --help Show this help message and exit.
-V, --version Show the conda version number and exit.
conda commands available from other packages:
build
convert
develop
env
index
inspect
metapackage
render
server
skeleton
#对上文进行翻译可知:
conda是一个用于管理和部署应用程序、环境和包的工具。
有如下的选项:
位置参数:
命令
clean 删除未使用的包和缓存
config
creat 从指定包的列表中创建一个新的conda环境
help 显示可用的conda命令及其帮助字符串列表
info 显示当前conda安装的信息
init
install 将包的列表安装到指定的conda环境中
list 列出conda环境中相关的包
package 低级的conda包实用程序(实验)
remove 将包的列表从指定的conda环境中移除
uninstall remove的别名
run 在conda环境中运行可执行文件(实验)
search 搜索包并显示相关信息。输入是一个MatchSpec,一种用于conda包的查询语言。请参见下面的例子。
update 将conda包更新到最新的兼容版本
upgrade update的别名
可选参数:
-h, --help 显示此帮助消息并退出
-V, --version 显示conda版本号并退出
可以从其他包调用的conda指令:
build
convert
develop
env
index
inspect
metapackage
render
server
skeleton
Conda的常用操作
# 安装python包
conda install packagename # packagename为所要安装的python包的名称
# 显示当前已经安装的包列表
conda list
# 清理conda
conda clean -p # 删除从不使用的包
conda clean -t # 删除tar包
conda clean -a # 删除所有的安装包及cache
# 更新python库
conda update packagename # 更新名为packagename的库
conda update conda # 更新conda
conda update --all # 更新所有的库