diff --git a/build/runner/src/pyenv.rs b/build/runner/src/pyenv.rs index 9d65626ca..efd58fd91 100644 --- a/build/runner/src/pyenv.rs +++ b/build/runner/src/pyenv.rs @@ -36,7 +36,7 @@ pub fn setup_pyenv(args: PyenvArgs) { // remove UV_* environment variables to avoid interference for (key, _) in std::env::vars() { - if key.starts_with("UV_") { + if key.starts_with("UV_") || key == "VIRTUAL_ENV" { command.env_remove(key); } } diff --git a/qt/launcher/src/main.rs b/qt/launcher/src/main.rs index d48adaf49..e1529f794 100644 --- a/qt/launcher/src/main.rs +++ b/qt/launcher/src/main.rs @@ -269,7 +269,7 @@ fn handle_version_install_or_update(state: &State, choice: MainMenuChoice) -> Re // remove UV_* environment variables to avoid interference for (key, _) in std::env::vars() { - if key.starts_with("UV_") { + if key.starts_with("UV_") || key == "VIRTUAL_ENV" { command.env_remove(key); } }