fix: remove --system-site-packages to avoid Python 3.12+ conflicts (#79)
Fixes #66 The --system-site-packages flag causes the virtual environment to inherit system packages, which can include versions incompatible with newer Python versions. On Arch/EndeavourOS with Python 3.12, an old coverage package from the system causes Whisper to fail with: module 'coverage.types' has no attribute 'Tracer' By creating an isolated virtual environment, all dependencies are installed at compatible versions within the venv, avoiding such conflicts.
This commit is contained in:
+5
-7
@@ -568,13 +568,11 @@ setup_virtual_environment() {
|
||||
fi
|
||||
|
||||
# Create virtual environment
|
||||
python3 -m venv "$VENV_DIR" --system-site-packages || {
|
||||
print_error "Failed to create virtual environment"
|
||||
print_info "Trying without --system-site-packages..."
|
||||
python3 -m venv "$VENV_DIR" || {
|
||||
print_error "Failed to create virtual environment. Please check your Python installation."
|
||||
exit 1
|
||||
}
|
||||
# Note: We don't use --system-site-packages to avoid conflicts with system packages
|
||||
# that may be incompatible with Python 3.12+ (e.g., old coverage versions)
|
||||
python3 -m venv "$VENV_DIR" || {
|
||||
print_error "Failed to create virtual environment. Please check your Python installation."
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Activate virtual environment
|
||||
|
||||
Reference in New Issue
Block a user