Skip to main content

Python

Miniconda is installed at /opt/miniconda. Conda is not activated in your terminal session by default. To activate conda, run conda init zsh. The default base environment can only be modified by the root user. We recommend that you create a new local environment for your user by running conda create --clone base --name myenv. You can also specify the version of Python to install with conda create --clone base --name myenv python=3.10. If the newly created environment does not show up as a kernel in the notebook, simply reload the window to refresh the available kernels.

Install the Jupyter extension from the Visual Studio Code Marketplace. Then, select the myenv Conda environment from the drop down menu in the top right corner of the Jupyter notebook. Installing dependencies is as simple as running !conda install <package> in one of the notebook cells or conda install --name myenv --yes <package> from the terminal.

To install packages into the Conda environment using pip, first install pip using conda install --yes pip. Otherwise, the system-wide pip will be used which will install packages in the wrong location.

To update Conda, run

sudo conda update --name base -c defaults --yes conda