Conda
Conda is an open source package management system and environment management system
- Query and search the Anaconda package index and current Anaconda installation
- Create new conda environments
- Install and update packages into existing conda environments
Package management
conda list, list installed packages
- conda list [packagename], search the installed version of a package
conda search [packagename], search availabe package from repository
conda --version, check conda version
conda install
- conda install [packagename], install a specific package
- conda install scipy=0.15.0, install a specific version of scipy
- conda install scipy=0.15.0 curl=7.26.0 -n py34_env, install packages for a specific python version
- conda install [packagename] -c [channelname], install a package from a specific channel
conda remove
- conda remove [packagename], remove a package in the current environment
- conda remove -n [environmentname] [packagename], remove a package in a specific environment
conda repository
- conda list --explicit, list the reposiotories including the installed packages
- conda config --add channels conda-forge, add a repository
conda update [packagename], update a package to the current version
conda clean, remove all unused packages in a conda virtual environment
Environment management
conda create
- conda create --name [environmentname] [packagename], create an environment and install specific package
- conda create --name [environmentname] anaconda=1.4.0 python=2.7 numpy=1.6, manage python version, anaconda version, and package version
- conda create --name [environmentname] python=2.7, create an empty conda environment
conda remove --name [environmentname] --all, remove an environment
source activate [environmentname], active a specific environment on Mac and Linux
- activate [environmentname], on Windows
source deactivate, deactivate the current environment on Mac and Linux
conda info --envs (conda env list), list all the environments
conda env export --file SOME_FILE, export the environment to a file
conda env create -n [environmentname] -f=[SOME_FILE], create an environment based on an environment file
Install Ipython Notebook
- conda config --env --add channels conda-forge
- conda config --env --set channel_priority strict
- conda install ipython-notebook, install ipython in an environment, otherwise "ipython notebook" will launch using base environment
- pip install jupyter
Work with Pip
- source activate [environmentname], switch to a specific environment
- conda install pip, install pip in the environment
- pip install [packagename], install packages
Reference