Inhaltsverzeichnis

Installing Miniconda and Jupyter

This guide explains how to install Miniconda and JupyterLab on Windows, macOS, and Linux.

Miniconda is a minimal Python distribution containing Python, the conda package/environment manager, and a small set of basic packages. Jupyter is not included by default, so we will install it into a separate conda environment.

1. Download Miniconda

The links below use Anaconda's latest aliases. This means that they should continue to point to the newest available Miniconda installer without requiring this tutorial to be updated for every release.

Operating system Architecture Installer
Windows 10/11 64-bit Intel/AMD (x86-64) Download Miniconda for Windows
macOS Apple Silicon (M1/M2/M3/M4/M5, ARM64) Download Miniconda for Apple Silicon Mac
macOS Intel (x86-64, older Macs) Download Miniconda for Intel Mac
Linux 64-bit Intel/AMD (x86-64) Download Miniconda for Linux x86-64
Linux ARM64 / AArch64 Download Miniconda for Linux ARM64

All available installers can also be found here:

Official Miniconda installer directory

Important: Intel Macs are now a legacy platform for Anaconda/Miniconda. The Intel installer remains available, but new Intel macOS builds are no longer produced. Most Macs sold since late 2020 use Apple Silicon.

2. Windows

Install Miniconda

  1. Download the Windows x86-64 installer from the link above.
  2. Double-click the downloaded .exe file.
  3. Select Just Me when asked who should receive the installation.
  4. Keep the default installation directory unless you have a reason to change it.
  5. On the Advanced Installation Options screen:
    • keep Create shortcuts enabled;
    • do not enable Add Miniconda3 to my PATH environment variable;
    • keeping Register Miniconda3 as my default Python enabled is normally fine on a fresh computer.
  6. Finish the installation.

Verify the installation

Open the Windows Start menu and search for Anaconda Prompt.

You should see (base) at the beginning of the prompt.

Run:

conda --version
python --version

If both commands print version numbers, Miniconda is installed correctly.

Optional: enable conda in PowerShell

If you want to use normal PowerShell instead of Anaconda Prompt, run this once from Anaconda Prompt:

conda init powershell

Then close and reopen PowerShell.

3. macOS

Check which Mac you have

Most Macs sold since late 2020 use Apple Silicon.

You can check the processor in Apple menu → About This Mac, or open Terminal and run:

uname -m

Possible results:

Install Miniconda

  1. Download the appropriate .pkg installer from the table above.
  2. Open it and follow the installation wizard.
  3. When installation has finished, close and reopen Terminal.

Verify the installation:

conda --version
python --version

If conda is not found, initialize it manually. A standard user installation is usually located in ~/miniconda3:

~/miniconda3/bin/conda init zsh
source ~/.zshrc

4. Linux

Check the CPU architecture

Open a terminal and run:

uname -m

Usually you will see one of these:

Install Miniconda

Download the appropriate .sh installer from the table above. It will normally be saved in ~/Downloads.

For a normal Intel/AMD Linux computer:

cd ~/Downloads
bash Miniconda3-latest-Linux-x86_64.sh

For an ARM64 Linux computer:

cd ~/Downloads
bash Miniconda3-latest-Linux-aarch64.sh

During installation:

  1. press Enter to read the license;
  2. type yes to accept it;
  3. press Enter to accept the default installation location;
  4. answer yes when asked whether conda should initialize your shell.

After installation, close and reopen the terminal.

Alternatively, refresh the current terminal:

For Bash:

source ~/.bashrc

For Zsh:

source ~/.zshrc

Verify the installation:

conda --version
python --version

5. Create a Jupyter environment

The following steps are the same on Windows, macOS, and Linux.

Note: It is good practice not to install course packages directly into the base environment. Instead, create a separate environment for Jupyter and the packages used in the course.

Create an environment named jupyter containing Python 3.13, JupyterLab, and the Python kernel:

conda create -n jupyter -c conda-forge --override-channels python=3.13 jupyterlab ipykernel

When conda asks whether to continue, type:

y

Activate the environment:

conda activate jupyter

Your terminal prompt should now begin with something similar to:

(jupyter)

6. Start JupyterLab

Activate the environment if it is not already active:

conda activate jupyter

Navigate to the directory in which you want to work.

For example, on macOS/Linux:

cd ~/Documents

On Windows:

cd %USERPROFILE%\Documents

Start JupyterLab:

jupyter lab

JupyterLab should open automatically in your web browser.

<note> Do not close the terminal window while JupyterLab is running. The Jupyter server runs in this terminal. </note>

7. Test the installation

In JupyterLab:

  1. click File → New → Notebook or select the Python notebook launcher;
  2. create a new cell;
  3. enter:
print("Jupyter is working!")
 
import sys
print(sys.version)
print(sys.executable)

Run the cell with Shift + Enter.

If the output is displayed without an error, the installation is working.

8. Stop JupyterLab

Return to the terminal in which JupyterLab is running and press:

Ctrl+C

If asked whether you want to shut down the server, confirm with y.

9. Using Jupyter later

Every time you want to use this environment:

conda activate jupyter
jupyter lab

To leave the environment:

conda deactivate

10. Installing additional Python packages

Activate the environment first:

conda activate jupyter

For example, to install NumPy, pandas, SciPy, and Matplotlib from conda-forge:

conda install -c conda-forge --override-channels numpy pandas scipy matplotlib

For packages that are not available through conda, use pip only after activating the correct conda environment:

python -m pip install PACKAGE_NAME

11. Useful conda commands

Command Meaning
conda env list List all conda environments
conda activate jupyter Activate the Jupyter environment
conda deactivate Leave the current environment
conda list List packages installed in the active environment
conda remove -n jupyter –all Completely delete the Jupyter environment

Troubleshooting

''conda: command not found''

First close and reopen the terminal.

On macOS with Zsh:

~/miniconda3/bin/conda init zsh
source ~/.zshrc

On Linux with Bash:

~/miniconda3/bin/conda init bash
source ~/.bashrc

On Windows, open Anaconda Prompt from the Start menu instead of a normal Command Prompt.

Jupyter opens in the wrong environment

Check that the jupyter environment is active before starting JupyterLab:

conda activate jupyter
jupyter lab

You can check which Python executable is currently being used with:

python -c "import sys; print(sys.executable)"

Official documentation