Skip to content

[Bug] Install failed to create directory $HOME\AppData\Local\uv\cache: Cannot create a file when that file already exists. (os error 183) #8991

Closed

Description

@Zueuk

name: Unsloth Studio Bug
about: Report a problem with the Unsloth Studio desktop app or web UI
title: "[Studio Bug] "
labels: bug
assignees: ""

Environment

Where are you using Unsloth?

  • Studio desktop application
  • Studio web UI (unsloth studio)
  • Unsloth CLI
  • Python package or notebook
  • Colab or Kaggle

Operating system and version:
Windows 10

Versions:
Unsloth-Desktop-0_1_800_beta-Windows.exe

What happened?

Steps to reproduce:

  1. Run the installer
  2. Choose a location where to install

Expected behavior:

  1. Expect to install TO CHOSEN LOCATION, not to C:\Users...\AppData\Local\whatever!!! My system drive space is not unlimited. You weren't going to download 20+ Gb GGUFs there, didn't you?

Actual behavior:

Setup ran into a problem

Installation failed: create virtual environment failed (exit code 2): Caused by: failed to create directory $HOME\AppData\Local\uv\cache: Cannot create a file when that file already exists. (os error 183)

Besides, I already have at least 3 different copies of Python, including 3.13 - why do I need another one? Installed on my system drive??

Desktop application

Click Copy Diagnostics on the error, startup, or update screen and paste the
result below:

Unsloth Support Diagnostics
diag_report_schema=1
created_at_ms=1786879829618
app_version=0.1.800-beta
os=windows
arch=x86_64
debug_build=false
appimage=false
cpu_logical_count=8
studio_dir=<studio_home>
logs_dir=<studio_home>\logs
app_session_id=app-1786878729069-1
app_started_at_ms=1786878729069
disk_budget=5MiB x 3 segments x 5 groups x 4 kinds ~= 300MiB plus tauri.log/.1

== Trigger/UI state ==
status=install-error
error=Installation failed: create virtual environment failed (exit code 2): Caused by: failed to create directory `$HOME\AppData\Local\uv\cache`: Cannot create a file when that file already exists. (os error 183)
current_step_index=3
progress_detail=unavailable
flow=install
update_phase=unavailable
update_progress=unavailable
elevation_packages=
last_ui_log_tail:
  Starting installation...
  Using script: \\?\Z:\AI\Unsloth Studio\install.ps1
  
    🦥 Unsloth Studio Installer (Windows)
    ────────────────────────────────────────────────────
  
  [TAURI:STEP] Checking system dependencies
    winget         available
  [TAURI:STEP] Installing Python
                   installing Python 3.13...
  Found an existing package already installed. Trying to upgrade the installed package...
  Found Python 3.13 [Python.Python.3.13] Version 3.13.15
  This application is licensed to you by its owner.
  Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
  Downloading https://www.python.org/ftp/python/3.13.15/python-3.13.15-amd64.exe
  Successfully verified installer hash
  Starting package install...
  Successfully installed
                   Python not found on PATH after winget. Retrying with --force...
  Found Python 3.13 [Python.Python.3.13] Version 3.13.15
  This application is licensed to you by its owner.
  Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
  Downloading https://www.python.org/ftp/python/3.13.15/python-3.13.15-amd64.exe
  Successfully verified installer hash
  Starting package install...
  still working during "Installing Python" -- 8 min so far
  Successfully installed
  [TAURI:DIAG] diag_schema=1 platform=windows arch=x86_64 python_version=3.13 skip_torch=false mac_intel=false gpu_branch=unknown torch_index_family=none
  [TAURI:STEP] Installing uv package manager
                   updating uv package manager...
  No installed package found matching input criteria.
  Found uv [astral-sh.uv] Version 0.12.5
  This application is licensed to you by its owner.
  Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
  This package requires the following dependencies:
    - Packages
        Microsoft.VCRedist.2015+.x64
  Downloading https://github.com/astral-sh/uv/releases/download/0.12.5/uv-x86_64-pc-windows-msvc.zip
  Successfully verified installer hash
  Extracting archive...
  Successfully extracted archive
  Starting package install...
  Path environment variable modified; restart your shell to use the new value.
  Command line alias added: "uvx"
  Command line alias added: "uv"
  Command line alias added: "uvw"
  Successfully installed
  [TAURI:STEP] Creating virtual environment
    venv           creating Python 3.13 virtual environment
                   <studio_home>\unsloth_studio
  error: Failed to initialize cache at `$HOME\AppData\Local\uv\cache`
    Caused by: failed to create directory `$HOME\AppData\Local\uv\cache`: Cannot create a file when that file already exists. (os error 183)
  
  [ERROR] Failed to create virtual environment (exit code 2)

== Preflight/install state ==
source=live-state
recorded_at_ms=1786878733612
disposition=not_installed
reason=unavailable
port=unavailable
can_auto_repair=false
managed_bin=unavailable

== Flow summaries ==
install: source=live-state flow=install attempt_id=install-1786878744032-2 group_id=none child_type=none started_at_ms=1786878744032 ended_at_ms=1786879320215 exit_status=exit code: 2 intentional_stop=false last_error=Installation failed: create virtual environment failed (exit code 2): Caused by: failed to create directory `$HOME\AppData\Local\uv\cache`: Cannot create a file when that file already exists. (os error 183) log_segments=<studio_home>\logs\install-install-1786878744032-2-s01.log
install.steps: omitted=0
  Checking system dependencies
  Installing Python
  Installing uv package manager
  Creating virtual environment
install.progress_details: omitted=0
  unavailable
install.diag_markers: omitted=0
  diag_schema=1 platform=windows arch=x86_64 python_version=3.13 skip_torch=false mac_intel=false gpu_branch=unknown torch_index_family=none
update: unavailable
repair_groups:
  unavailable

== Backend/auth/watchdog ==
backend=unavailable backend_kind=unknown
auth_failure=unavailable
runtime_health:
  unavailable: no known backend port

== Lightweight device signals ==
scope=setup/runtime signals, not full hardware inventory
os=windows arch=x86_64
installer_diag_markers:
  install: diag_schema=1 platform=windows arch=x86_64 python_version=3.13 skip_torch=false mac_intel=false gpu_branch=unknown torch_index_family=none

== Log tails ==
file=<studio_home>\tauri.log label=tauri.log source=local-app-log size_bytes=5527 mtime_ms=1786879320214 included_bytes=5527 included_lines=63 truncated=false
```text
11:12:09 [INFO] Unsloth desktop app starting
11:12:09 [INFO] Windows app job object initialized for crash-safe child cleanup
11:12:11 [INFO] Managed preflight: install probe result Missing in 2ms
11:12:13 [INFO] desktop_preflight completed disposition=NotInstalled port=None in 2022ms
11:12:24 [INFO] [install] Starting installation...
11:12:24 [INFO] Production: using bundled script at \\?\Z:\AI\Unsloth Studio\install.ps1
11:12:24 [INFO] [install] Using script: \\?\Z:\AI\Unsloth Studio\install.ps1
11:12:24 [INFO] [install][stdout] 
11:12:24 [INFO] [install][stdout]   🦥 Unsloth Studio Installer (Windows)
11:12:24 [INFO] [install][stdout]   ────────────────────────────────────────────────────
11:12:24 [INFO] [install][stdout] 
11:12:25 [INFO] [install][stdout] [TAURI:STEP] Checking system dependencies
11:12:26 [INFO] [install][stdout]   winget         available
11:12:26 [INFO] [install][stdout] [TAURI:STEP] Installing Python
11:12:26 [INFO] [install][stdout]                  installing Python 3.13...
11:12:31 [INFO] [install][stdout] Found an existing package already installed. Trying to upgrade the installed package...
11:12:31 [INFO] [install][stdout] Found Python 3.13 [Python.Python.3.13] Version 3.13.15
11:12:31 [INFO] [install][stdout] This application is licensed to you by its owner.
11:12:31 [INFO] [install][stdout] Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
11:12:31 [INFO] [install][stdout] Downloading https://www.python.org/ftp/python/3.13.15/python-3.13.15-amd64.exe
11:12:38 [INFO] [install][stdout] Successfully verified installer hash
11:12:39 [INFO] [install][stdout] Starting package install...
11:15:58 [INFO] [install][stdout] Successfully installed
11:15:59 [INFO] [install][stdout]                  Python not found on PATH after winget. Retrying with --force...
11:16:00 [INFO] [install][stdout] Found Python 3.13 [Python.Python.3.13] Version 3.13.15
11:16:00 [INFO] [install][stdout] This application is licensed to you by its owner.
11:16:00 [INFO] [install][stdout] Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
11:16:00 [INFO] [install][stdout] Downloading https://www.python.org/ftp/python/3.13.15/python-3.13.15-amd64.exe
11:16:06 [INFO] [install][stdout] Successfully verified installer hash
11:16:07 [INFO] [install][stdout] Starting package install...
11:21:07 [INFO] [install] still working during "Installing Python" -- 8 min so far
11:21:40 [INFO] [install][stdout] Successfully installed
11:21:42 [INFO] [install][stdout] [TAURI:DIAG] diag_schema=1 platform=windows arch=x86_64 python_version=3.13 skip_torch=false mac_intel=false gpu_branch=unknown torch_index_family=none
11:21:42 [INFO] [install][stdout] [TAURI:STEP] Installing uv package manager
11:21:44 [INFO] [install][stdout]                  updating uv package manager...
11:21:46 [INFO] [install][stdout] No installed package found matching input criteria.
11:21:48 [INFO] [install][stdout] Found uv [astral-sh.uv] Version 0.12.5
11:21:48 [INFO] [install][stdout] This application is licensed to you by its owner.
11:21:48 [INFO] [install][stdout] Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
11:21:48 [INFO] [install][stdout] This package requires the following dependencies:
11:21:48 [INFO] [install][stdout]   - Packages
11:21:48 [INFO] [install][stdout]       Microsoft.VCRedist.2015+.x64
11:21:48 [INFO] [install][stdout] Downloading https://github.com/astral-sh/uv/releases/download/0.12.5/uv-x86_64-pc-windows-msvc.zip
11:21:52 [INFO] [install][stdout] Successfully verified installer hash
11:21:52 [INFO] [install][stdout] Extracting archive...
11:21:57 [INFO] [install][stdout] Successfully extracted archive
11:21:57 [INFO] [install][stdout] Starting package install...
11:21:57 [INFO] [install][stdout] Path environment variable modified; restart your shell to use the new value.
11:21:57 [INFO] [install][stdout] Command line alias added: "uvx"
11:21:57 [INFO] [install][stdout] Command line alias added: "uv"
11:21:57 [INFO] [install][stdout] Command line alias added: "uvw"
11:21:57 [INFO] [install][stdout] Successfully installed
11:22:00 [INFO] [install][stdout] [TAURI:STEP] Creating virtual environment
11:22:00 [INFO] [install][stdout]   venv           creating Python 3.13 virtual environment
11:22:00 [INFO] [install][stdout]                  <studio_home>\unsloth_studio
11:22:00 [INFO] [install][stdout] [TAURI:OUTPUT_CLEAR] create virtual environment
11:22:00 [INFO] [install][stdout] error: Failed to initialize cache at `$HOME\AppData\Local\uv\cache`
11:22:00 [INFO] [install][stdout]   Caused by: failed to create directory `$HOME\AppData\Local\uv\cache`: Cannot create a file when that file already exists. (os error 183)
11:22:00 [INFO] [install][stdout] 
11:22:00 [INFO] [install][stdout] [TAURI:ERROR_OUTPUT] create virtual environment failed (exit code 2)
11:22:00 [INFO] [install][stdout] [ERROR] Failed to create virtual environment (exit code 2)
11:22:00 [INFO] [install][stdout] [TAURI:ERROR_DEFAULT] Failed to create virtual environment (exit code 2)
11:22:00 [ERROR] [install] FAILED: Installation failed: create virtual environment failed (exit code 2): Caused by: failed to create directory `$HOME\AppData\Local\uv\cache`: Cannot create a file when that file already exists. (os error 183)

file=<studio_home>\tauri.log.1 label=tauri.log.1 source=local-app-log unavailable=The system cannot find the file specified. (os error 2)

-- phase_log_group label=install:install-1786878744032-2 source=live-state --
file=<studio_home>\logs\install-install-1786878744032-2-s01.log label=install:install-1786878744032-2 source=live-state size_bytes=4383 mtime_ms=1786879320103 included_bytes=4383 included_lines=62 truncated=false

# Unsloth diagnostics phase log
diag_schema=1
flow=install
segment_index=1
started_at_ms=1786878744032
attempt_id=install-1786878744032-2
--- log ---
[1786878744033][meta] Using script: \\?\Z:\AI\Unsloth Studio\install.ps1
[1786878744979][stdout] 
[1786878744980][stdout]   🦥 Unsloth Studio Installer (Windows)
[1786878744988][stdout]   ────────────────────────────────────────────────────
[1786878744989][stdout] 
[1786878745974][stdout] [TAURI:STEP] Checking system dependencies
[1786878746017][stdout]   winget         available
[1786878746017][stdout] [TAURI:STEP] Installing Python
[1786878746232][stdout]                  installing Python 3.13...
[1786878751441][stdout] Found an existing package already installed. Trying to upgrade the installed package...
[1786878751513][stdout] Found Python 3.13 [Python.Python.3.13] Version 3.13.15
[1786878751514][stdout] This application is licensed to you by its owner.
[1786878751514][stdout] Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
[1786878751519][stdout] Downloading https://www.python.org/ftp/python/3.13.15/python-3.13.15-amd64.exe
[1786878758792][stdout] Successfully verified installer hash
[1786878759396][stdout] Starting package install...
[1786878958337][stdout] Successfully installed
[1786878959871][stdout]                  Python not found on PATH after winget. Retrying with --force...
[1786878960719][stdout] Found Python 3.13 [Python.Python.3.13] Version 3.13.15
[1786878960719][stdout] This application is licensed to you by its owner.
[1786878960719][stdout] Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
[1786878960736][stdout] Downloading https://www.python.org/ftp/python/3.13.15/python-3.13.15-amd64.exe
[1786878966317][stdout] Successfully verified installer hash
[1786878967324][stdout] Starting package install...
[1786879300927][stdout] Successfully installed
[1786879302123][stdout] [TAURI:DIAG] diag_schema=1 platform=windows arch=x86_64 python_version=3.13 skip_torch=false mac_intel=false gpu_branch=unknown torch_index_family=none
[1786879302123][stdout] [TAURI:STEP] Installing uv package manager
[1786879304977][stdout]                  updating uv package manager...
[1786879306303][stdout] No installed package found matching input criteria.
[1786879308022][stdout] Found uv [astral-sh.uv] Version 0.12.5
[1786879308022][stdout] This application is licensed to you by its owner.
[1786879308022][stdout] Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
[1786879308166][stdout] This package requires the following dependencies:
[1786879308167][stdout]   - Packages
[1786879308168][stdout]       Microsoft.VCRedist.2015+.x64
[1786879308174][stdout] Downloading https://github.com/astral-sh/uv/releases/download/0.12.5/uv-x86_64-pc-windows-msvc.zip
[1786879312791][stdout] Successfully verified installer hash
[1786879312802][stdout] Extracting archive...
[1786879317531][stdout] Successfully extracted archive
[1786879317534][stdout] Starting package install...
[1786879317879][stdout] Path environment variable modified; restart your shell to use the new value.
[1786879317880][stdout] Command line alias added: "uvx"
[1786879317880][stdout] Command line alias added: "uv"
[1786879317880][stdout] Command line alias added: "uvw"
[1786879317880][stdout] Successfully installed
[1786879320004][stdout] [TAURI:STEP] Creating virtual environment
[1786879320007][stdout]   venv           creating Python 3.13 virtual environment
[1786879320007][stdout]                  <studio_home>\unsloth_studio
[1786879320023][stdout] [TAURI:OUTPUT_CLEAR] create virtual environment
[1786879320089][stdout] error: Failed to initialize cache at `$HOME\AppData\Local\uv\cache`
[1786879320089][stdout]   Caused by: failed to create directory `$HOME\AppData\Local\uv\cache`: Cannot create a file when that file already exists. (os error 183)
[1786879320089][stdout] 
[1786879320093][stdout] [TAURI:ERROR_OUTPUT] create virtual environment failed (exit code 2)
[1786879320093][stdout] [ERROR] Failed to create virtual environment (exit code 2)
[1786879320105][stdout] [TAURI:ERROR_DEFAULT] Failed to create virtual environment (exit code 2)

== Collection warnings ==

  • <studio_home>\tauri.log.1 unavailable: The system cannot find the file specified. (os error 2)

== Redaction/omission summary ==
redaction_replacements=16
redaction_scope=ANSI, private keys, URL credentials, auth headers, cookies, token patterns, assignment-style secrets, studio/home paths, emails
report_bounds=log sections <=1000 lines/200KiB each; total clipboard text <=1MiB
known_v1_gap=elevated apt helper may buffer subprocess output before diagnostics caps it
known_v1_gap=normal install elevation resume is linked in same-run state/report history; disk fallback conservatively includes recent install attempts but has no explicit install_group_id in V1

Additional context

I had to put on eyeglasses to read this
Image

Activity

  1. added
    feature request
    on Aug 16, 2026
  2. indrajeetapache commented on Aug 16, 2026

    @indrajeetapache
    Contributor

    Hi Team — I can take the Windows installer crash (uv cache path already exists, os error 183) as a small PR: point UV_CACHE_DIR at the Studio cache dir and recover if that path is a file. Happy to leave the “install all data to the chosen drive” work to you if that’s already on the roadmap. Okay to proceed with the cache-dir fix?

  3. danielhanchen commented on Sep 9, 2026

    @danielhanchen
    Member

    Fixed! The installer only adopts the shared uv cache if it's a real directory with packages in it, otherwise it uses a cache inside the Studio folder, and that's set before the venv step. The separate Python install on the system drive isn't changed yet.

    To update: the desktop app updates itself (Settings > General), otherwise unsloth studio update, or in Docker docker exec <container> unsloth-studio-update.

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

Metadata

Metadata

Labels

bugfeature request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions