文章目录
1、conda basics(基本指令)
指令说明 | 指令 |
---|---|
验证conda是否安装成功以及安装的版本 | conda info |
更新当前的conda版本 | conda update conda |
安装conda包 | conda install PACKAGENAME |
安装之后运行包,比如“spyder” | spyder |
更新已安装的包 | conda update PACKAGENAME |
命令行帮助指令 | COMMANDNAME–help /conda install --help |
2、using environments(与环境相关的指令)
指令说明 | 指令 |
---|---|
创造一个叫py35的环境 | conda create --name py35 python==3.5 |
激活环境并使用 | Windows:activate py35/Linux,macOS:source activate py35 |
列出所有的环境,当前使用的环境名称会有* | conda env list |
复制一个环境 | conda create --clone py35 --name py35-2 |
列出当前环境所安装的包 | conda list |
列出当前环境每一次改变的记录 | conda list --reversions |
restore environment to a previous revision | conda install --revision 2 |
把环境存到txt文件中 | conda list --explicit > bio-env.txt |
删除一个环境以及该环境里面的包 | conda env remove --name bio-env |
退出当前的环境 | Windows:deactivate /Linux,macOS:source deactivate |
从一个txt文件中创建一个环境 | conda env create --file bio-env.txt |
stack commands:创建一个叫bio-env的环境并且安装biopython包 | conda create --name bio-env biopython |
3、finding conda packages
指令说明 | 指令 |
---|---|
使用conda命令搜索软件包 | conda search PACKAGENAME |
anaconda里面的所有的包 | https://docs.anaconda.com/anaconda/packages/pkg-docs |
4、installing and updating packages
指令说明 | 指令 |
---|---|
install a new package(jupyter notebook)in the activtae environment | conda install jupyter |
Run an installed package(jupyter notebook) | jupyter-notebook |
Install a new package (toolz) in a different environment(bio-env) | conda install --name bio-env toolz |
Update a package in the current environment | conda update scikit-learn |
Install a package (boltons) from a specific channel (conda-forge) | conda install --channel conda-forge boltons |
Install a package directly from PyPI into the current active environment using pip | pip install boltons |
Remove one or more packages (toolz, boltons) from a specific environment (bio-env) | conda remove --name bio-env toolz boltons |
5、Managing multiple versions of Python
指令说明 | 指令 |
---|---|
Install different version of Python in a new environment named py34 | conda create --name py34 python=3.4 |
Switch to the new environment that has a different version of Python | Windows: activate py34/Linux, macOS: source activate py34 |
Show the locations of all versions of Python that are currently in the path | Windows: where python/Linux, macOS: which -a python |
Show version information for the current active Python | python --version |
6、More sources
指令说明 | 指令 |
---|---|
Free Community Support | groups.google.com/a/continuum.io/forum/#!forum/conda |
Online Documentation | conda.io/docs |
Command Reference | conda.io/docs/commands |
Paid Support Options | anaconda.com/support |
Anaconda Onsite Training Courses | anaconda.com/training |
Anaconda Consulting Services | anaconda.com/consulting |