Conda

Create an environment

conda create -n env_name python=3.6

It is important to add python=3.6 otherwise default python command will be v2.7 and to use v3.6 (or newer) you will need to use the command python3

Good practice: always install packages in a new environment and create a new environment for a new project !

From an environment.yml: conda env create -f environment.yml

Activate environment

conda activate env_name

Return to base environment

conda deactivate

Remove an environment:

conda env remove -n env_name

List all existing environments

conda env list

List packages installed

conda list

List the packages installed in the active environment.

Be careful of duplicate install between conda and pip !

Export packages installed to an environment.yml file

conda env export > environment.yml

Exports the active environment.

This handles both pip and conda packages !