Skip to content

Instantly share code, notes, and snippets.

@jlant
Last active September 9, 2016 14:40
Show Gist options
  • Save jlant/bc7f6ba53c0b82b8fca6 to your computer and use it in GitHub Desktop.
Save jlant/bc7f6ba53c0b82b8fca6 to your computer and use it in GitHub Desktop.
Conda - useful commands

Conda commands

References

http://conda.pydata.org/docs/index.html
http://astropy.readthedocs.org/en/latest/development/workflow/virtual_pythons.html#create-env
http://stackoverflow.com/questions/24405561/how-to-install-2-anacondas-python-2-7-and-3-4-on-mac-os-10-9

Create a virtual environment with Python 3.4

$ conda create -n some_venv python=3.4 

Create a virtual environment with Python 2.7 version of Anaconda

$ conda create -n python27 python=2.7 anaconda

Install a new package in a virtual environment (without activating the virtual environment)

$ conda install -n some_venv some_project

Activate the virtual environment - puts the environment at the beginning of PATH

$ source activate python27

Deactivate the virtual environment

$ source deactivate

List 3rd party package installs in virtual environment

$ conda create -n some_venv python=3.4 
$ conda install click
$ ls ~/anaconda3/envs/some_venv/lib/python3.4/site-packages/

List list all info about your conda

$ conda info -a

Install from specific channel (also can add to ~/.conda)

$ conda install -c <channel-name> <package-name>

Install from yaml file

$ conda env create -f <some-yaml-file>

Miscellaneous info about Anaconda3

QtDesigner - C:\Anaconda3\Library\bin (https://groups.google.com/a/continuum.io/forum/#!topic/anaconda/BJDlv48fKJ8)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment