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.
This commit is contained in:
parent
f9c4b08726
commit
afb929271c
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue