My Digital Garden

Conda Environments

Conda Environments

Conda provides an extensive interface to manage python virtual environments that provides additional functionality over venv

Creating an environment

In Windows, open the Anaconda prompt, in WSL2 / Linux any shell prompt once you have installed miniconda or Anaconda.

  • create the environment

    conda create --name myenv
  • activate the environment

    conda activate myenv

Configuring the environment for running Jupyter notebooks

  • install packages (example packages for data science experiments)

    conda install pandas scikit-learn matplotlib jupyter jupyterlab sqlalchemy seaborn pip git nbconvert
  • you might want to install tools from a different update channel:

    conda install -c conda-forge jupyter_contrib_nbextensions
    conda update conda
    conda update --all

Alternatively, you can install packages (and optionally pin versions) at the point you create the environment:

conda create --name myenv python=3.11 pandas scikit-learn matplotlib jupyter jupyterlab sqlalchemy seaborn pip git nbconvert openpyxl

Adding virtual python kernel

In most cases you will also want to add a virtual python kernel to run notebooks.

See also