Skip to content

[Bug] unsloth studio setup failed #6898

Closed

Description

@huainian6911

I failed to install Unsloth Studio, the installation log is as follows.

GPU: RTX5060Ti

Mon Jul  6 15:54:50 2026
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 595.97                 Driver Version: 595.97         CUDA Version: 13.2     |
+-----------------------------------------+------------------------+----------------------+
| GPU  Name                  Driver-Model | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce RTX 5060 Ti   WDDM  |   00000000:01:00.0  On |                  N/A |
|  0%   40C    P3            N/A  /  N/A  |    1384MiB /  16311MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

CUDA:

Copyright (c) 2005-2026 NVIDIA Corporation
Built on Mon_Mar__2_21:54:11_Pacific_Standard_Time_2026
Cuda compilation tools, release 13.2, V13.2.51
Build cuda_13.2.r13.2/compiler.37434383_0

Windows11 25H2

PS C:\Users\53106> irm https://unsloth.ai/install.ps1 | iex

  🦥 Unsloth Studio Installer (Windows)
  ────────────────────────────────────────────────────

  winget         available
  python         Python 3.13 already installed
  venv           creating Python 3.13 virtual environment
                 C:\Users\53106\.unsloth\studio\unsloth_studio
  gpu            NVIDIA GPU detected
                 installing PyTorch (https://download.pytorch.org/whl/cu130)...
                 installing unsloth (this may take a few minutes)...
                 PyTorch flavor mismatch (installed cpu, need cu130) -- reinstalling correct build...

  [WARN] PyTorch is CPU-only but a cu130 GPU build was expected for this machine.
  [WARN] Training and GPU inference will run on CPU until this is fixed.
  [WARN] Re-run this installer, or reinstall the GPU build manually for your GPU.
  setup          running unsloth studio setup...

  🦥 Unsloth Studio Setup
  ────────────────────────────────────────────────────
  gpu            NVIDIA GPU detected
  long paths     enabled
  git            git version 2.54.0.windows.1
  vcredist       present
  cmake          cmake version 4.3.3
  vs             Visual Studio 17 2022 (filesystem (BuildTools)) (only used if a source build is needed)
                 cl.exe: C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.44.
35207\bin\Hostx64\x64\cl.exe
                 Node v24.11.0 and npm 11.6.2 already meet requirements (system).
                 Python 3.13.14

  system         prerequisites ready

  frontend       up to date
  node           v24.11.0 | npm 11.6.2 (system)
                 installing OXC validator runtime...
  oxc runtime    installed

                 setting up Python environment...
                 Python found: C:\Users\53106\.unsloth\studio\unsloth_studio\Scripts\python.exe
                 Stale venv detected (torch cpu != required cu130).
   [ERROR] The existing Studio environment needs repair.
           Re-run install.ps1 so it can replace the environment safely with rollback.
[ERROR] unsloth studio setup failed (exit code 1)

Activity

  1. Etherll commented on Jul 8, 2026

    @Etherll
    Collaborator

    Thanks for the full log - this looks like a bug. The machine is correctly selecting cu130, but Torch is ending up CPU-only and then setup rejects the venv; could you rerun with $env:UNSLOTH_VERBOSE='1'; irm https://unsloth.ai/install.ps1 | iex and paste the PyTorch reinstall part of the log? That should show why the CUDA Torch install is not sticking.

  2. huainian6911 commented on Jul 8, 2026

    @huainian6911
    Author

    @Etherll

    PS C:\Users\53106> $env:UNSLOTH_VERBOSE='1'; irm https://unsloth.ai/install.ps1 | iex

    
      🦥 Unsloth Studio Installer (Windows)
      ────────────────────────────────────────────────────
    
      winget         available
      python         Python 3.13 already installed
      venv           creating Python 3.13 virtual environment
                     C:\Users\53106\.unsloth\studio\unsloth_studio
    uv : Using CPython 3.13.14 interpreter at: AppData\Local\Programs\Python\Python313\python.exe
    所在位置 行:1494 字符: 45
    + ... nstallCommand { uv venv $VenvDir --python "$($DetectedPython.Path)" }
    +                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (Using CPython 3...n313\python.exe:String) [], RemoteException
        + FullyQualifiedErrorId : NativeCommandError
    
    Creating virtual environment at: .unsloth\studio\unsloth_studio
    Activate with: .unsloth\studio\unsloth_studio\Scripts\activate
      gpu            NVIDIA GPU detected
                     installing PyTorch (https://download.pytorch.org/whl/cu130)...
    uv : Using Python 3.13.14 environment at: .unsloth\studio\unsloth_studio
    所在位置 行:2226 字符: 87
    + ...  PyTorch" { uv pip install --python $VenvPython "torch>=2.4,<2.11.0"  ...
    +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (Using Python 3....\unsloth_studio:String) [], RemoteException
        + FullyQualifiedErrorId : NativeCommandError
    
    Resolved 14 packages in 608ms
    Prepared 1 package in 32ms
    Installed 14 packages in 5.57s
     + filelock==3.29.7
     + fsspec==2026.6.0
     + jinja2==3.1.6
     + markupsafe==3.0.3
     + mpmath==1.3.0
     + networkx==3.6.1
     + numpy==2.5.1
     + pillow==12.3.0
     + setuptools==83.0.0
     + sympy==1.14.0
     + torch==2.10.0
     + torchaudio==2.11.0
     + torchvision==0.25.0
     + typing-extensions==4.16.0
                     installing unsloth (this may take a few minutes)...
    uv : Using Python 3.13.14 environment at: .unsloth\studio\unsloth_studio
    所在位置 行:2252 字符: 86
    + ...  unsloth" { uv pip install --python $VenvPython --upgrade-package uns ...
    +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (Using Python 3....\unsloth_studio:String) [], RemoteException
        + FullyQualifiedErrorId : NativeCommandError
    
    Resolved 84 packages in 1.10s
    Downloading unsloth (71.3MiB)
    Downloading unsloth-zoo (1.5MiB)
     Downloaded unsloth-zoo
     Downloaded unsloth
    Prepared 5 packages in 2.69s
    Uninstalled 1 package in 3ms
    Installed 72 packages in 2.49s
     + accelerate==1.14.0
     + aiohappyeyeballs==2.7.1
     + aiohttp==3.14.1
     + aiosignal==1.4.0
     + annotated-doc==0.0.4
     + annotated-types==0.7.0
     + anyio==4.14.1
     + attrs==26.1.0
     + bitsandbytes==0.49.2
     + certifi==2026.6.17
     + charset-normalizer==3.4.9
     + click==8.4.2
     + colorama==0.4.6
     + cut-cross-entropy==25.1.1
     + datasets==4.3.0
     + diffusers==0.39.0
     + dill==0.4.0
     + docstring-parser==0.18.0
     + frozenlist==1.8.0
     - fsspec==2026.6.0
     + fsspec==2025.9.0
     + h11==0.16.0
     + hf-transfer==0.1.9
     + hf-xet==1.5.1
     + httpcore==1.0.9
     + httpx==0.28.1
     + huggingface-hub==1.22.0
     + idna==3.18
     + importlib-metadata==9.0.0
     + markdown-it-py==4.2.0
     + mdurl==0.1.2
     + msgspec==0.21.1
     + multidict==6.7.1
     + multiprocess==0.70.16
     + nest-asyncio==1.6.0
     + packaging==26.2
     + pandas==3.0.3
     + peft==0.19.1
     + propcache==0.5.2
     + protobuf==7.35.1
     + psutil==7.2.2
     + pyarrow==24.0.0
     + pydantic==2.13.4
     + pydantic-core==2.46.4
     + pygments==2.20.0
     + python-dateutil==2.9.0.post0
     + pyyaml==6.0.3
     + regex==2026.6.28
     + requests==2.34.2
     + rich==15.0.0
     + safetensors==0.8.0
     + sentencepiece==0.2.1
     + shellingham==1.5.4
     + six==1.17.0
     + tokenizers==0.22.2
     + torchao==0.17.0
     + tqdm==4.68.4
     + transformers==5.5.0
     + triton-windows==3.7.1.post27
     + trl==0.24.0
     + typeguard==4.5.2
     + typer==0.26.8
     + typing-inspection==0.4.2
     + tyro==1.0.15
     + tzdata==2026.2
     + unsloth==2026.7.1
     + unsloth-zoo==2026.7.1
     + urllib3==2.7.0
     + wheel==0.47.0
     + xformers==0.0.35
     + xxhash==3.8.1
     + yarl==1.24.2
     + zipp==4.1.0
                     PyTorch flavor mismatch (installed cpu, need cu130) -- reinstalling correct build...
    uv : Using Python 3.13.14 environment at: .unsloth\studio\unsloth_studio
    所在位置 行:2334 字符: 61
    + ... llCommand { uv pip install --python $VenvPython "torch>=2.4,<2.11.0"  ...
    +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (Using Python 3....\unsloth_studio:String) [], RemoteException
        + FullyQualifiedErrorId : NativeCommandError
    
    Resolved 14 packages in 94ms
    Prepared 3 packages in 12ms
    Uninstalled 3 packages in 1.26s
    Installed 3 packages in 1.61s
     ~ torch==2.10.0
     ~ torchaudio==2.11.0
     ~ torchvision==0.25.0
    
      [WARN] PyTorch is CPU-only but a cu130 GPU build was expected for this machine.
      [WARN] Training and GPU inference will run on CPU until this is fixed.
      [WARN] Re-run this installer, or reinstall the GPU build manually for your GPU.
      setup          running unsloth studio setup...
    
      🦥 Unsloth Studio Setup
      ────────────────────────────────────────────────────
      gpu            NVIDIA GPU detected
      long paths     enabled
      git            git version 2.54.0.windows.1
      vcredist       present
      cmake          cmake version 4.3.3
      vs             Visual Studio 17 2022 (filesystem (BuildTools)) (only used if a source build is needed)
                     cl.exe: C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.44.
    35207\bin\Hostx64\x64\cl.exe
                     Node v24.11.0 and npm 11.6.2 already meet requirements (system).
                     Python 3.13.14
    
      system         prerequisites ready
    
      frontend       up to date
      node           v24.11.0 | npm 11.6.2 (system)
                     installing OXC validator runtime...
    
    added 7 packages in 1s
    
    3 packages are looking for funding
      run `npm fund` for details
    node.exe : npm notice
    所在位置 行:1 字符: 1
    + & "E:\Program Files\nodejs/node.exe" "C:\Users\53106\AppData\Roaming\ ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (npm notice:String) [], RemoteException
        + FullyQualifiedErrorId : NativeCommandError
    
    npm notice New minor version of npm available! 11.6.2 -> 11.18.0
    npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.18.0
    npm notice To update run: npm install -g [email protected]
    npm notice
      oxc runtime    installed
    
                     setting up Python environment...
                     Python found: C:\Users\53106\.unsloth\studio\unsloth_studio\Scripts\python.exe
                     Stale venv detected (torch cpu != required cu130).
       [ERROR] The existing Studio environment needs repair.
               Re-run install.ps1 so it can replace the environment safely with rollback.
    [ERROR] unsloth studio setup failed (exit code 1)
    
    
  3. huainian6911 commented on Jul 8, 2026

    @huainian6911
    Author

    I suddenly remembered that I had set UV_DEFAULT_INDEX in the system environment variables. After I deleted this environment variable, Unsloth Studio installed successfully.

    Can the installation script be modified so that it can still install correctly when UV_DEFAULT_INDEX is set?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions