@@ -3,7 +3,7 @@ set -e # Exit immediately if a command exits with a non-zero status
33
44printf " \033]0;Installer\007"
55clear
6- rm -f * .bat
6+ rm -f * .bat
77
88# Function to log messages with timestamps
99log_message () {
@@ -13,13 +13,13 @@ log_message() {
1313
1414# Function to find a suitable Python version
1515find_python () {
16- for py in python3.11 python3 python; do
16+ for py in python3.12 python3 python; do
1717 if command -v " $py " > /dev/null 2>&1 ; then
1818 echo " $py "
1919 return
2020 fi
2121 done
22- log_message " No compatible Python installation found. Please install Python 3.11 ."
22+ log_message " No compatible Python installation found. Please install Python 3.12 ."
2323 exit 1
2424}
2525
@@ -97,13 +97,13 @@ create_venv() {
9797 py=$( find_python)
9898
9999 curl -LsSf https://astral.sh/uv/install.sh | sh
100- uv venv .venv --python 3.11
100+ uv venv .venv --python 3.12
101101
102102 log_message " Activating virtual environment..."
103103 source .venv/bin/activate
104104
105105 install_ffmpeg
106- install_python_ffmpeg
106+ install_python_ffmpeg
107107
108108 log_message " Installing dependencies..."
109109 if [ -f " requirements.txt" ]; then
@@ -134,41 +134,39 @@ if [ "$(uname)" = "Darwin" ]; then
134134 # Add more detailed Python version check
135135 log_message " Checking Python versions..."
136136 log_message " python3 path: $( which python3) "
137- log_message " python3.11 path: $( which python3.11 2> /dev/null || echo ' not found' ) "
138-
139- if command -v python3.11 > /dev/null 2>&1 ; then
140- python_version=$( python3.11 --version | awk ' {print $2}' | cut -d' .' -f1,2)
137+ log_message " python3.12 path: $( which python3.12 2> /dev/null || echo ' not found' ) "
138+
139+ if command -v python3.12 > /dev/null 2>&1 ; then
140+ python_version=$( python3.12 --version | awk ' {print $2}' | cut -d' .' -f1,2)
141141 else
142142 python_version=$( python3 --version | awk ' {print $2}' | cut -d' .' -f1,2)
143143 fi
144-
144+
145145 log_message " Detected Python version: $python_version "
146146
147- if [ " $python_version " = " 3.11 " ]; then
148- log_message " Found compatible Python 3.11 "
147+ if [ " $python_version " = " 3.12 " ]; then
148+ log_message " Found compatible Python 3.12 "
149149 else
150- log_message " Python version $python_version is not 3.11 . Installing Python 3.11 using Homebrew..."
151- brew install python@3.11
152- export PATH=" $( brew --prefix) /opt/python@3.11 /bin:$PATH "
150+ log_message " Python version $python_version is not 3.12 . Installing Python 3.12 using Homebrew..."
151+ brew install python@3.12
152+ export PATH=" $( brew --prefix) /opt/python@3.12 /bin:$PATH "
153153 # Verify the installed version
154154 log_message " Verifying installed Python version..."
155- python_version=$( python3.11 --version | awk ' {print $2}' | cut -d' .' -f1,2)
156- if [ " $python_version " != " 3.11 " ]; then
157- log_message " Failed to install Python 3.11 . Current version: $python_version "
155+ python_version=$( python3.12 --version | awk ' {print $2}' | cut -d' .' -f1,2)
156+ if [ " $python_version " != " 3.12 " ]; then
157+ log_message " Failed to install Python 3.12 . Current version: $python_version "
158158 exit 1
159159 fi
160160 fi
161161
162162 brew install faiss
163163 export PYTORCH_ENABLE_MPS_FALLBACK=1
164164 export PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0
165- export PATH=" $( brew --prefix) /bin:$PATH "
165+ export PATH=" $( brew --prefix) /bin:$PATH "
166166elif [ " $( uname) " != " Linux" ]; then
167167 log_message " Unsupported operating system. Are you using Windows?"
168168 log_message " If yes, use the batch (.bat) file instead of this one!"
169169 exit 1
170170fi
171171
172172prepare_install
173-
174-
0 commit comments