Anaconda cheat sheet

This is a simple cheat sheet to set up and start using conda environment

To see all installed packages

conda list

To create new enviroment with name myenv

conda create --name myenv

To create new environment specifying the packages to be installed

conda create --name env python=3.7 numpy=1.18 pyserial

This is to create enviroment at different path, first go to that path and use the command below

conda create -p ./myenv

This command does the same thing as above

conda create --prefix ./myenv

To activate the environment

conda activate D:\pythoncode\myenv

if you’re at the directory of environment

conda activate ./myenv

To install python with a particular version in conda environment

conda install python=3.7

Install several packages together

conda install numpy pyserial pyyaml pyqt pyqtgraph

I need to read about this command

conda install -c conda-forge pint

To deactivate conda environment

conda deactivate

To exit from the conda environment

exit()

To remove the conda environment

conda remove --name env --all

To remove the conda environment at different path

conda env remove -p D:\pythoncode\envqiskit-metal

Creating an environment from an environment.yml file

conda env create -f environmet.yml

Export your active environment to a new file

conda env export > environment.yml