> For the complete documentation index, see [llms.txt](https://unsloth.ai/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://unsloth.ai/docs/de/loslegen/install/pip-install.md).

# Unsloth über pip und uv installieren

Installiere Unsloth Studio manuell oder installiere Unsloth Core mit pip, uv oder einer virtuellen Umgebung.

**Unsloth Desktop**, **Unsloth Studio**, und **Unsloth Core** werden unterschiedlich installiert. Diese Seite behandelt die manuelle Studio-Installation und das codebasierte Core-Paket.

### Unsloth Desktop

Für die native Desktop-App verwenden Sie den OS-Download statt der untenstehenden Befehle:

* <i class="fa-apple">:apple:</i> [Download für macOS](https://unsloth.ai/download/mac)
* <i class="fa-windows">:windows:</i> [Download für Windows](https://unsloth.ai/download/windows)
* <i class="fa-linux">:linux:</i> [Download für Linux](https://unsloth.ai/download/linux)

## **Unsloth Studio**

**Unsloth Studio** ist unsere Web-UI. Folgen Sie unten für die native Installation:

{% tabs %}
{% tab title="macOS, Linux, WSL" %}
**Unsloth installieren:**

```bash
curl -fsSL https://unsloth.ai/install.sh | sh
```

Verwenden Sie denselben Befehl zum Aktualisieren.
{% endtab %}

{% tab title="Windows" %}
**Unsloth installieren:**

```powershell
irm https://unsloth.ai/install.ps1 | iex
```

Verwenden Sie denselben Befehl zum Aktualisieren.
{% endtab %}

{% tab title="Docker" %}
Das [Unsloth-Docker-Image](https://hub.docker.com/r/unsloth/unsloth) `unsloth/unsloth` ist auf Docker verfügbar. [Anleitung lesen.](https://unsloth.ai/docs/get-started/install/docker)
{% endtab %}

{% tab title="Homebrew" %}
**Unsloth installieren:**

```bash
brew install --cask unsloth
```

Unsloth aktualisieren:

```bash
brew upgrade --cask unsloth
```

{% endtab %}

{% tab title="WinGet" %}
**Unsloth installieren:**

```powershell
winget install --id UnslothAI.Unsloth -e
```

Unsloth aktualisieren:

```powershell
winget upgrade --id UnslothAI.Unsloth -e
```

{% endtab %}
{% endtabs %}

#### Starten:

{% columns %}
{% column %}
Standardmäßiger lokaler Start:

```bash
unsloth studio
```

Für Details zur Installation und Deinstallation besuchen Sie bitte den [Unsloth Studio-Installation](/docs/de/neu/studio/install.md) Abschnitt.
{% endcolumn %}

{% column %}
Starten Sie Unsloth sicher über HTTPS:

```bash
unsloth studio --secure
```

Verwenden Sie einen [kostenlosen Cloudflare](/docs/de/grundlagen/lokale-llms-uberall-bereitstellen-sicherer-remote-zugriff-mit-cloudflare-und-unsloth.md) Tunnel unter Windows, Mac oder Linux.
{% endcolumn %}
{% endcolumns %}

### **Installation aus dem Haupt-Repo**

#### **Entwicklerinstallationen für macOS, Linux, WSL:**

```bash
git clone https://github.com/unslothai/unsloth
cd unsloth
./install.sh --local
unsloth studio -H 0.0.0.0 -p 8888
```

#### **Entwicklerinstallationen für Windows PowerShell:**

```powershell
winget install -e --id Python.Python.3.13 --source winget
winget install --id=astral-sh.uv  -e --source winget
winget install --id Git.Git -e --source winget
git clone https://github.com/unslothai/unsloth
cd unsloth
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
.\install.ps1 --local
unsloth studio -H 0.0.0.0 -p 8888
```

### **Nightly-Installation**

#### **Nightly - macOS, Linux, WSL:**

```bash
git clone https://github.com/unslothai/unsloth
cd unsloth
git checkout nightly
./install.sh --local
```

Dann jedes Mal zum Starten:

```bash
unsloth studio -H 0.0.0.0 -p 8888
```

#### **Nightly - Windows:**

In Windows PowerShell ausführen:

```bash
winget install -e --id Python.Python.3.13 --source winget
winget install --id=astral-sh.uv  -e --source winget
winget install --id Git.Git -e --source winget
git clone https://github.com/unslothai/unsloth
cd unsloth
git checkout nightly
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
.\install.ps1 --local
```

Dann jedes Mal zum Starten:

<pre class="language-bash"><code class="lang-bash"><strong>unsloth studio -H 0.0.0.0 -p 8888
</strong></code></pre>

### **Eine ältere Version verwenden**

#### **Unsloth Desktop**

Um eine ältere Version von Unsloth Desktop zu verwenden, ist es ganz einfach. Schauen Sie einfach durch [unsere GitHub-Releases](https://github.com/unslothai/unsloth/releases) und wählen Sie die spezifische Release aus, die Sie im Bereich 'Assets' installieren möchten.

#### **Unsloth Studio**

Um eine ältere Version von Unsloth Studio zu verwenden, folgen Sie unten mit Ihrer gewünschten Version und den Namen:

**macOS, Linux, WSL:**

```shellscript
uv pip install \
  --python "$HOME/.unsloth/studio/unsloth_studio/bin/python" \
  --reinstall --no-deps "unsloth==VERSION"

"$HOME/.unsloth/studio/unsloth_studio/bin/unsloth" studio -p 8888
```

**Windows:**&#x20;

```shellscript
uv pip install `
  --python "$env:USERPROFILE\.unsloth\studio\unsloth_studio\Scripts\python.exe" `
  --reinstall --no-deps "unsloth==VERSION"

& "$env:USERPROFILE\.unsloth\studio\unsloth_studio\Scripts\unsloth.exe" studio -p 8888
```

### Deinstallieren

Der empfohlene Weg, Unsloth Studio vollständig zu entfernen, ist das Deinstallationsskript für Ihr Betriebssystem. Es beendet alle laufenden Server, entfernt die App, den CLI-Befehl, Launcher-Daten, Verknüpfungen und plattformspezifische Einträge (macOS `.app` Bundle + Launch Services; Windows-Startmenü + Registry + PATH):

**macOS, WSL, Linux:**

```shellscript
curl -fsSL https://raw.githubusercontent.com/unslothai/unsloth/main/scripts/uninstall.sh | sh
```

**Windows (PowerShell):**

```ps1
irm https://raw.githubusercontent.com/unslothai/unsloth/main/scripts/uninstall.ps1 | iex 
```

#### Manuelle Deinstallation

Wenn Sie lieber nur bestimmte Teile entfernen möchten:

**1. Nur die App entfernen** (behält Verlauf, Chats, Checkpoints und Exporte intakt):

* **macOS, WSL, Linux:** `rm -rf ~/.unsloth/studio/unsloth_studio`
* **Windows (PowerShell):** `Remove-Item -Recurse -Force "$HOME\.unsloth\studio\unsloth_studio"`

**2. Unsloth vollständig entfernen** (behält andere Unsloth-Tools intakt):

* **macOS, WSL, Linux:** `rm -rf ~/.unsloth/studio`
* **Windows (PowerShell):** `Remove-Item -Recurse -Force "$HOME\.unsloth\studio"`

**3. Alles Unsloth-bezogene entfernen:**

* **macOS, WSL, Linux:** `rm -rf ~/.unsloth`
* **Windows (PowerShell):** `Remove-Item -Recurse -Force "$HOME\.unsloth"`

{% hint style="warning" %}
Hinweis: Schritt 3 löscht alles in Verlauf, Chats, Modell-Checkpoints und Exporten. Dies kann nicht rückgängig gemacht werden.
{% endhint %}

**4. Verknüpfungen und symbolische Links entfernen:**

**macOS:**

```shellscript
rm -rf ~/Applications/Unsloth\ Studio.app ~/Desktop/Unsloth\ Studio
```

**Linux:**&#x20;

```shellscript
rm -f ~/.local/share/applications/unsloth-studio.desktop ~/Desktop/unsloth-studio.desktop
```

**WSL / Windows (PowerShell):**

```shellscript
Remove-Item -Force "$HOME\Desktop\Unsloth Studio.lnk"
Remove-Item -Force "$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Unsloth Studio.lnk"
```

**5. Den CLI-Befehl entfernen:**

* **macOS, Linux, WSL:** `rm -f ~/.local/bin/unsloth`
* **Windows (PowerShell):** Der Installer hat das Verzeichnis der venv `Scripts` dem Benutzer-PATH hinzugefügt. Um es zu entfernen, öffnen Sie Einstellungen → System → Info → Erweiterte Systemeinstellungen → Umgebungsvariablen und suchen Sie nach `Pfad` unter den Benutzervariablen und entfernen Sie den Eintrag, der verweist auf `.unsloth\studio\...\Scripts`.

{% hint style="info" %}
Hinweis: Die Schritte 1-5 berühren Ihre heruntergeladenen HF-Modelldateien nicht. Siehe unten „Zwischengespeicherte HF-Modelldateien löschen“, wenn Sie diesen Speicherplatz zurückgewinnen möchten.
{% endhint %}

### **Zwischengespeicherte HF-Modelldateien löschen**

Sie können alte Modelldateien entweder über das Papierkorb-Symbol in der Modellsuche löschen oder den entsprechenden zwischengespeicherten Modellordner aus dem standardmäßigen Hugging-Face-Cache-Verzeichnis entfernen. Standardmäßig verwendet Hugging Face `~/.cache/huggingface/hub/` unter macOS/Linux/WSL und `C:\Users\<username>\.cache\huggingface\hub\` unter Windows.

* **macOS, Linux, WSL:** `~/.cache/huggingface/hub/`
* **Windows:** `%USERPROFILE%\.cache\huggingface\hub\`

Wenn `HF_HUB_CACHE` oder `HF_HOME` gesetzt ist, verwenden Sie stattdessen diesen Speicherort. Unter Linux und WSL, `XDG_CACHE_HOME` kann ebenfalls den standardmäßigen Cache-Stamm ändern.

## **Unsloth Core**

**Installieren Sie uv mit dem folgenden Befehl:**

**macOS, WSL, Linux:**

```shellscript
curl -LsSf https://astral.sh/uv/install.sh | sh
```

**Windows (PowerShell):**

```powershell
irm https://astral.sh/uv/install.ps1 | iex
```

**Installieren Sie Unsloth Core mit uv pip (empfohlen) für die neueste Pip-Version:**

```bash
uv venv unsloth_env --python 3.13
source unsloth_env/bin/activate
uv pip install unsloth --torch-backend=auto
```

Oder einfach pip:

```bash
pip install unsloth
```

Um **vLLM und Unsloth** zusammen, führen Sie Folgendes aus:

```bash
uv pip install unsloth vllm --torch-backend=auto
```

Um den **neuesten Main-Branch** von Unsloth zu installieren, führen Sie Folgendes aus:

{% code overflow="wrap" %}

```bash
uv pip install unsloth --torch-backend=auto
pip uninstall unsloth unsloth_zoo -y && pip install --no-deps git+https://github.com/unslothai/unsloth_zoo.git && pip install --no-deps git+https://github.com/unslothai/unsloth.git
```

{% endcode %}

Für **Installationen mit venv und virtuellen Umgebungen** um Ihre Installation zu isolieren, damit Systempakete nicht beschädigt werden und irreparable Schäden an Ihrem System zu reduzieren, verwenden Sie venv:

{% code overflow="wrap" %}

```bash
apt install python3.10-venv python3.11-venv python3.12-venv python3.13-venv -y
python -m venv unsloth_env
source unsloth_env/bin/activate
pip install --upgrade pip && pip install uv
uv pip install unsloth --torch-backend=auto
```

{% endcode %}

Wenn Sie Unsloth in Jupyter, Colab oder anderen Notebooks installieren, stellen Sie sicher, dass Sie dem Befehl voranstellen `!`. Dies ist nicht erforderlich, wenn Sie ein Terminal verwenden

{% hint style="info" %}
Python 3.13 wird jetzt unterstützt!
{% endhint %}

### Unsloth Core deinstallieren

Wenn Sie weiterhin auf Abhängigkeitsprobleme mit Unsloth stoßen, haben viele Nutzer sie durch ein erzwungenes Deinstallieren und erneutes Installieren von Unsloth behoben:

{% code overflow="wrap" %}

```bash
pip install --upgrade --force-reinstall --no-cache-dir --no-deps unsloth
pip install --upgrade --force-reinstall --no-cache-dir --no-deps unsloth_zoo
```

{% endcode %}

### Erweiterte Pip-Installation

{% hint style="warning" %}
Tun Sie **NICHT** verwenden Sie dies, wenn Sie [Conda](/docs/de/loslegen/install/conda-install.md).
{% endhint %}

Pip ist etwas komplexer, da es Abhängigkeitsprobleme gibt. Der Pip-Befehl ist unterschiedlich für `torch 2.2,2.3,2.4,2.5` und CUDA-Versionen.

Für andere torch-Versionen unterstützen wir `torch211`, `torch212`, `torch220`, `torch230`, `torch240` und für CUDA-Versionen unterstützen wir `cu118` und `cu121` und `cu124`. Für Ampere-Geräte (A100, H100, RTX3090) und höher verwenden Sie `cu118-ampere` oder `cu121-ampere` oder `cu124-ampere`.

Wenn Sie beispielsweise `torch 2.4` und `CUDA 12.1`, verwenden Sie:

```bash
pip install --upgrade pip
pip install "unsloth[cu121-torch240] @ git+https://github.com/unslothai/unsloth.git"
```

Ein weiteres Beispiel: Wenn Sie `torch 2.5` und `CUDA 12.4`, verwenden Sie:

```bash
pip install --upgrade pip
pip install "unsloth[cu124-torch250] @ git+https://github.com/unslothai/unsloth.git"
```

Und weitere Beispiele:

```bash
pip install "unsloth[cu121-ampere-torch240] @ git+https://github.com/unslothai/unsloth.git"
pip install "unsloth[cu118-ampere-torch240] @ git+https://github.com/unslothai/unsloth.git"
pip install "unsloth[cu121-torch240] @ git+https://github.com/unslothai/unsloth.git"
pip install "unsloth[cu118-torch240] @ git+https://github.com/unslothai/unsloth.git"

pip install "unsloth[cu121-torch230] @ git+https://github.com/unslothai/unsloth.git"
pip install "unsloth[cu121-ampere-torch230] @ git+https://github.com/unslothai/unsloth.git"

pip install "unsloth[cu121-torch250] @ git+https://github.com/unslothai/unsloth.git"
pip install "unsloth[cu124-ampere-torch250] @ git+https://github.com/unslothai/unsloth.git"
```

Oder führen Sie das Folgende in einem Terminal aus, um den **optimalen** Pip-Installationsbefehl zu erhalten:

```bash
wget -qO- https://raw.githubusercontent.com/unslothai/unsloth/main/unsloth/_auto_install.py | python -
```

Oder führen Sie das Folgende manuell in einer Python-REPL aus:

{% code overflow="wrap" %}

```python
# Lizenziert unter der Apache License, Version 2.0 (der "Lizenz")
try: import torch
except: raise ImportError('Installieren Sie torch via `pip install torch`')
from packaging.version import Version as V
import re
v = V(re.match(r"[0-9\.]{3,}", torch.__version__).group(0))
cuda = str(torch.version.cuda)
is_ampere = torch.cuda.get_device_capability()[0] >= 8
USE_ABI = torch._C._GLIBCXX_USE_CXX11_ABI
if cuda not in ("11.8", "12.1", "12.4", "12.6", "12.8", "13.0"): raise RuntimeError(f"CUDA = {cuda} wird nicht unterstützt!")
if   v <= V('2.1.0'): raise RuntimeError(f"Torch = {v} ist zu alt!")
elif v <= V('2.1.1'): x = 'cu{}{}-torch211'
elif v <= V('2.1.2'): x = 'cu{}{}-torch212'
elif v  < V('2.3.0'): x = 'cu{}{}-torch220'
elif v  < V('2.4.0'): x = 'cu{}{}-torch230'
elif v  < V('2.5.0'): x = 'cu{}{}-torch240'
elif v  < V('2.5.1'): x = 'cu{}{}-torch250'
elif v <= V('2.5.1'): x = 'cu{}{}-torch251'
elif v  < V('2.7.0'): x = 'cu{}{}-torch260'
elif v  < V('2.7.9'): x = 'cu{}{}-torch270'
elif v  < V('2.8.0'): x = 'cu{}{}-torch271'
elif v  < V('2.8.9'): x = 'cu{}{}-torch280'
elif v  < V('2.9.1'): x = 'cu{}{}-torch290'
elif v  < V('2.9.2'): x = 'cu{}{}-torch291'
else: raise RuntimeError(f"Torch = {v} ist zu neu!")
if v > V('2.6.9') and cuda not in ("11.8", "12.6", "12.8", "13.0"): raise RuntimeError(f"CUDA = {cuda} wird nicht unterstützt!")
x = x.format(cuda.replace(".", ""), "-ampere" if False else "") # is_ampere ist aufgrund von flash-attn fehlerhaft
print(f'pip install --upgrade pip && pip install --no-deps git+https://github.com/unslothai/unsloth-zoo.git && pip install "unsloth[{x}] @ git+https://github.com/unslothai/unsloth.git" --no-build-isolation')
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://unsloth.ai/docs/de/loslegen/install/pip-install.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
