Conda usage

Conda is package and virtual environment manager for python.

Conda installation

Download miniconda for windows https://conda.io/miniconda.html

Update conda

conda update conda

List virtualenv

conda env list

Create virtual environment

conda create -n dev [python=x.x anaconda]

Activate virtual environment

Linux:

source activate dev

Windows:

activate dev

Install packages to an environment

conda install -n dev [package]

Exit environment

Linux:

source deactivate

Windows:

deactivate

Install packages from environment.yml

conda env create -f environment.yml

Update packages from environment.yml

conda env update -f environment.yml

environment.yml example

name: test_demo
dependencies:
  - python=2.7
  - pip:
    - pytest==3.2.1

Remove virtualenv

conda env remove -n dev

Advertisements

One thought on “Conda usage

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s