Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
Roland Tannous
afb929271c fix: pass --clear to uv venv to handle leftover venv directory
When re-running install.sh, the existing venv is rm -rf'd only if
bin/python is executable. If the directory exists but is broken or
partial, the rm guard is skipped and uv venv fails with exit code 2:
"A directory already exists at: .unsloth/studio/unsloth_studio".

Adding --clear lets uv replace any existing directory at the path,
fixing re-installs without requiring user intervention.
2026-04-02 16:02:16 +00:00

View file

@ -927,7 +927,7 @@ fi
if [ ! -x "$VENV_DIR/bin/python" ]; then
step "venv" "creating Python ${PYTHON_VERSION} virtual environment"
substep "$VENV_DIR"
run_install_cmd "create venv" uv venv "$VENV_DIR" --python "$PYTHON_VERSION"
run_install_cmd "create venv" uv venv "$VENV_DIR" --python "$PYTHON_VERSION" --clear
fi
# Guard against Python 3.13.8 torch import bug on Apple Silicon