BenAAndrew / Voice-Cloning-App

A Python/Pytorch app for easily synthesising human voices
BSD 3-Clause "New" or "Revised" License
1.4k stars 234 forks source link

Python 3.6 no longer available via deadsnakes on latest Ubuntu LTS (22.04 / Jammy Jellyfish) #136

Open mithro opened 2 years ago

mithro commented 2 years ago

The current install script uses Python 3.6 -- however, Python 3.6 isn't available in the deadsnakes repository when using the latest Ubuntu LTS (see https://wiki.ubuntu.com/Releases -- 22.04 / Jammy Jellyfish).

It seems that the earliest version if Python available is Python 3.7 which does seems to have torch==1.9.0+cu111 requirement.

Changing the install script to use Python 3.7 (see diff below) seems to work;

diff --git a/install.sh b/install.sh
old mode 100644
new mode 100755
index 1abb1bc..5a35f53
--- a/install.sh
+++ b/install.sh
@@ -7,14 +7,14 @@ then
 fi

 # Install python
-if ! python3 --version 2>&1 | grep '3.6';
+if ! python3 --version 2>&1 | grep '3.7';
 then
-    echo "Installing Python 3.6"
+    echo "Installing Python 3.7"
     sudo apt-get install -y software-properties-common
     sudo add-apt-repository -y ppa:deadsnakes/ppa
     sudo apt-get update --fix-missing
-    sudo apt-get install -y python3.6 python3.6-distutils python3.6-dev
-    sudo python3.6 -m easy_install pip
+    sudo apt-get install -y python3.7 python3.7-distutils python3.7-dev
+    sudo python3.7 -m easy_install pip
 else
     echo "Python installed"
 fi
@@ -23,6 +23,6 @@ fi
 sudo apt-get install -y ffmpeg libsndfile1

 # Install Dependencies
-python3.6 -m pip install -r requirements.txt
+python3.7 -m pip install -r requirements.txt
 echo "Successfully installed python packages"
 echo "Install complete"

Output at the end;

Installing collected packages: webrtcvad, Unidecode, pydub, llvmlite, inflect, audioread, Werkzeug, tqdm, torch, threadpoolctl, regex, python-engineio, pysrt, pycparser, omegaconf, numba, matplotlib, joblib, Jinja2, itsdangerous, deepspeech, bidict, torchvision, torchaudio, scikit-learn, resampy, python-socketio, nltk, Flask, cffi, soundfile, librosa, Flask-SocketIO
Successfully installed Flask-1.1.2 Flask-SocketIO-5.0.1 Jinja2-3.1.2 Unidecode-1.0.22 Werkzeug-2.1.2 audioread-2.1.9 bidict-0.22.0 cffi-1.15.1 deepspeech-0.9.3 inflect-0.2.5 itsdangerous-2.1.2 joblib-1.1.0 librosa-0.6.0 llvmlite-0.32.1 matplotlib-3.2.2 nltk-3.6.2 numba-0.47.0 omegaconf-2.0.6 pycparser-2.21 pydub-0.24.1 pysrt-1.1.2 python-engineio-4.3.3 python-socketio-5.7.0 regex-2022.6.2 resampy-0.3.0 scikit-learn-1.0.2 soundfile-0.10.3.post1 threadpoolctl-3.1.0 torch-1.9.0+cu111 torchaudio-0.9.0 torchvision-0.10.0+cu111 tqdm-4.64.0 webrtcvad-2.0.10
Successfully installed python packages
Install complete
BenAAndrew commented 2 years ago

Hi @mithro,

Thanks for letting me know. The reason the build is currently python 3.6 is because deepspeech currently only compiles correctly on windows for this version (due to some dll problems). I'd prefer to use the same python version for both windows/linux but if this is going to be an ongoing issue for newer versions of linux we can implement this change.

nicsor commented 2 years ago

It seems to work ok with 3.7 if you lock these versions in to their 3.6 version:

itsdangerous==2.0.1
werkzeug==2.0.3
joblib==1.1.0