en:miniconda

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Nächste Überarbeitung
Vorhergehende Überarbeitung
en:miniconda [2026/08/07 13:57] – angelegt egorpolyen:miniconda [2026/08/07 14:01] (aktuell) – [5. Create a Jupyter environment] egorpoly
Zeile 3: Zeile 3:
 This guide explains how to install **Miniconda** and **JupyterLab** on Windows, macOS, and Linux. 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. +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.
- +
-**Jupyter is not included by default**, so after installing Miniconda we will create a separate environment containing JupyterLab.+
  
 ===== 1. Download Miniconda ===== ===== 1. Download Miniconda =====
  
-The download links in this tutorial use Anaconda'**latest** installersThese links always point to the newest available Miniconda release, so you do not need to search for a particular version number.+The links below use Anaconda'''latest'' aliasesThis 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 ^ ^ Operating system ^ Architecture ^ Installer ^
-| Windows 10/11 | 64-bit Intel/AMD (x86-64) | Download the latest Windows x86-64 installer +| Windows 10/11 | 64-bit Intel/AMD (x86-64) | [[https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe|Download Miniconda for Windows]] 
-| macOS | Apple Silicon (M1/M2/M3/M4/M5, ARM64) | Download the latest MacOSX-arm64 installer +| macOS | Apple Silicon (M1/M2/M3/M4/M5, ARM64) | [[https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.pkg|Download Miniconda for Apple Silicon Mac]] 
-| macOS | Intel (x86-64, older Macs) | Download the Intel MacOSX-x86_64 installer +| macOS | Intel (x86-64, older Macs) | [[https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.pkg|Download Miniconda for Intel Mac]] 
-| Linux | 64-bit Intel/AMD (x86-64) | Download the latest Linux-x86_64 installer +| Linux | 64-bit Intel/AMD (x86-64) | [[https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh|Download Miniconda for Linux x86-64]] 
-| Linux | ARM64 / AArch64 | Download the latest Linux-aarch64 installer |+| Linux | ARM64 / AArch64 | [[https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh|Download Miniconda for Linux ARM64]] |
  
-<note important> +All available installers can also be found here:
-Most Macs sold since late 2020 use **Apple Silicon**.+
  
-Intel Macs are now a legacy platform for Anaconda/Miniconda. An Intel installer is still available, but new Intel macOS builds are no longer produced. </note>+[[https://repo.anaconda.com/miniconda/|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 ===== ===== 2. Windows =====
Zeile 27: Zeile 26:
 ==== Install Miniconda ==== ==== Install Miniconda ====
  
-Download the **Windows x86-64** ''.exe'' installer. +  - Download the **Windows x86-64** installer from the link above
-Double-click the downloaded file. +  Double-click the downloaded ''.exe'' file. 
-Select **Just Me**. +  Select **Just Me** when asked who should receive the installation
-Keep the default installation directory unless you have a reason to change it. +  Keep the default installation directory unless you have a reason to change it. 
-On the **Advanced Installation Options** screen: +  On the **Advanced Installation Options** screen: 
- +    * keep **Create shortcuts** enabled; 
-  * keep **Create shortcuts** enabled; +    * **do not enable** //Add Miniconda3 to my PATH environment variable//; 
-  * **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. 
-  * keeping //Register Miniconda3 as my default Python// enabled is normally fine on a fresh computer. +  Finish the installation.
-Finish the installation.+
  
 ==== Verify the installation ==== ==== Verify the installation ====
  
-Open the Windows Start menu and search for+Open the Windows Start menu and search for **Anaconda Prompt**.
- +
-**Anaconda Prompt**+
  
-You should see ''(base)'' at the beginning of the command line.+You should see ''(base)'' at the beginning of the prompt.
  
 Run: Run:
Zeile 55: Zeile 51:
 If both commands print version numbers, Miniconda is installed correctly. If both commands print version numbers, Miniconda is installed correctly.
  
-==== Optional: use conda from PowerShell ====+==== Optional: enable conda in PowerShell ====
  
 If you want to use normal PowerShell instead of Anaconda Prompt, run this once from Anaconda Prompt: If you want to use normal PowerShell instead of Anaconda Prompt, run this once from Anaconda Prompt:
Zeile 69: Zeile 65:
 ==== Check which Mac you have ==== ==== Check which Mac you have ====
  
-You can check the processor under:+Most Macs sold since late 2020 use Apple Silicon.
  
-**Apple menu -> About This Mac** +You can check the processor in **Apple menu -> About This Mac**, or open Terminal and run:
- +
-Alternatively, open **Terminal** and run:+
  
 <code bash> <code bash>
Zeile 81: Zeile 75:
 Possible results: Possible results:
  
-* ''arm64'' -> Apple Silicon -> use the **MacOSX-arm64** installer. +  * ''arm64'' -> Apple Silicon -> use the **MacOSX-arm64** installer. 
-* ''x86_64'' -> Intel Mac -> use the **MacOSX-x86_64** installer.+  * ''x86_64'' -> Intel Mac -> use the **MacOSX-x86_64** installer.
  
 ==== Install Miniconda ==== ==== Install Miniconda ====
  
-Download the appropriate ''.pkg'' installer. +  - Download the appropriate ''.pkg'' installer from the table above
-Open it+  Open it and follow the installation wizard. 
-* Follow the installation wizard. +  When installation has finished, close and reopen Terminal.
-When installation has finished, close and reopen Terminal.+
  
 Verify the installation: Verify the installation:
Zeile 98: Zeile 91:
 </code> </code>
  
-If ''conda'' is not found, first close and reopen Terminal. +If ''conda'' is not found, initialize it manually. A standard user installation is usually located in ''~/miniconda3'':
- +
-If it is still not found, initialize conda manually:+
  
 <code bash> <code bash>
Zeile 119: Zeile 110:
 Usually you will see one of these: Usually you will see one of these:
  
-* ''x86_64'' -> standard Intel/AMD PC -> use **Linux-x86_64**. +  * ''x86_64'' -> standard Intel/AMD PC -> use **Linux-x86_64**. 
-* ''aarch64'' or ''arm64'' -> ARM64 machine -> use **Linux-aarch64**.+  * ''aarch64'' or ''arm64'' -> ARM64 machine -> use **Linux-aarch64**.
  
 ==== Install Miniconda ==== ==== Install Miniconda ====
  
-Download the appropriate ''.sh'' installer. It will normally be saved in ''~/Downloads''.+Download the appropriate ''.sh'' installer from the table above. It will normally be saved in ''~/Downloads''.
  
 For a normal Intel/AMD Linux computer: For a normal Intel/AMD Linux computer:
Zeile 142: Zeile 133:
 During installation: During installation:
  
-press **Enter** to read the license; +  - press **Enter** to read the license; 
-type ''yes'' to accept it; +  type ''yes'' to accept it; 
-press **Enter** to accept the default installation location; +  press **Enter** to accept the default installation location; 
-answer ''yes'' when asked whether conda should initialize your shell.+  answer ''yes'' when asked whether conda should initialize your shell.
  
 After installation, close and reopen the terminal. After installation, close and reopen the terminal.
  
-Alternatively, refresh the current terminal.+Alternatively, refresh the current terminal:
  
 For Bash: For Bash:
Zeile 174: Zeile 165:
 The following steps are the same on **Windows, macOS, and Linux**. The following steps are the same on **Windows, macOS, and Linux**.
  
-<note> +**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.
-It is good practice **not to install course packages directly into the ''base'' environment**. +
- +
-Instead, we create a separate environment for Jupyter and the packages used in the course. </note>+
  
 Create an environment named ''jupyter'' containing Python 3.13, JupyterLab, and the Python kernel: Create an environment named ''jupyter'' containing Python 3.13, JupyterLab, and the Python kernel:
Zeile 197: Zeile 185:
 </code> </code>
  
-Your command prompt should now begin with something similar to:+Your terminal prompt should now begin with something similar to:
  
 <code> <code>
Zeile 205: Zeile 193:
 ===== 6. Start JupyterLab ===== ===== 6. Start JupyterLab =====
  
-First activate the environment if it is not already active:+Activate the environment if it is not already active:
  
 <code> <code>
Zeile 225: Zeile 213:
 </code> </code>
  
-Then start JupyterLab:+Start JupyterLab:
  
 <code> <code>
Zeile 241: Zeile 229:
 In JupyterLab: In JupyterLab:
  
-* select **File -> New -> Notebook**or click the **Python** notebook icon in the launcher; +  - click **File -> New -> Notebook** or select the **Python** notebook launcher; 
-create a new cell; +  create a new cell; 
-enter:+  enter:
  
 <code python> <code python>
Zeile 250: Zeile 238:
 import sys import sys
 print(sys.version) print(sys.version)
-print(sys.executable) </code> +print(sys.executable) 
- +</code>
-Run the cell with:+
  
-**Shift + Enter**+Run the cell with **Shift + Enter**.
  
 If the output is displayed without an error, the installation is working. If the output is displayed without an error, the installation is working.
Zeile 270: Zeile 257:
 ===== 9. Using Jupyter later ===== ===== 9. Using Jupyter later =====
  
-Every time you want to use this environment, open a terminal or Anaconda Prompt and run:+Every time you want to use this environment:
  
 <code> <code>
Zeile 291: Zeile 278:
 </code> </code>
  
-For example, to install NumPy, pandas, SciPy, and Matplotlib:+For example, to install NumPy, pandas, SciPy, and Matplotlib from conda-forge:
  
 <code> <code>
Zeile 302: Zeile 289:
 python -m pip install PACKAGE_NAME python -m pip install PACKAGE_NAME
 </code> </code>
- 
-Using: 
- 
-<code> 
-python -m pip 
-</code> 
- 
-instead of simply: 
- 
-<code> 
-pip 
-</code> 
- 
-helps ensure that the package is installed into the currently active Python environment. 
  
 ===== 11. Useful conda commands ===== ===== 11. Useful conda commands =====
Zeile 350: Zeile 323:
 ==== Jupyter opens in the wrong environment ==== ==== Jupyter opens in the wrong environment ====
  
-Make sure that the ''jupyter'' environment is active **before** starting JupyterLab:+Check that the ''jupyter'' environment is active before starting JupyterLab:
  
 <code> <code>
Zeile 363: Zeile 336:
 </code> </code>
  
-The displayed path should contain the ''jupyter'' conda environment. +===== Official documentation =====
- +
-===== Further information ===== +
- +
-See the official Miniconda, conda, and Project Jupyter documentation for additional information.+
  
 +  * [[https://www.anaconda.com/docs/getting-started/miniconda/install|Miniconda installation documentation]]
 +  * [[https://repo.anaconda.com/miniconda/|Official Miniconda installer archive]]
 +  * [[https://jupyter.org/install|Project Jupyter installation documentation]]
 +  * [[https://docs.conda.io/|Conda documentation]]
  • en/miniconda.1786111044.txt.gz
  • Zuletzt geändert: 2026/08/07 13:57
  • von egorpoly