[Discussion] Using Spleeter under Ubuntu 22.04 LTS
See original GitHub issueSpleeter (or a Python module it uses) appears to be incompatible with Python 3.10, however Python 3.10 is the default Python version in the recently-released Ubuntu 22.04.
It is possible to install Python 3.9 from the Ubuntu 22.04 repos using apt, but evidently virtualenv support is broken due to missing distutils module.
However we can build Python 3.9 manually from source and install it to $HOME/opt/python-3.9/:
sudo apt install build-essential libssl-dev
cd $HOME/src
wget https://www.python.org/ftp/python/3.9.12/Python-3.9.12.tar.xz
tar xf Python-3.9.12.tar.xz
cd Python-3.9.12
sh configure --prefix=$HOME/opt/python-3.9
make -j8
make install
Now install Spleeter in a Python 3.9 virtualenv:
cd $HOME
sudo apt install python3-pip
pip3 install --user virtualenv
virtualenv -p $HOME/opt/python-3.9/bin/python3 spleeter
source $HOME/spleeter/bin/activate
pip3 install --upgrade setuptools
pip3 install spleeter
Finally run Spleeter:
spleeter separate --verbose audio.mp3 -p spleeter:5stems-16kHz -o output
Note you’ll need to use the “source” command each time you want to run Spleeter from a new terminal. This configures the correct environment to set up Python 3.9 for Spleeter, ie.
source $HOME/spleeter/bin/activate
spleeter separate --verbose audio.mp3 -p spleeter:5stems-16kHz -o output
All of the above has been tested on x86_64. I can’t vouch for it working on arm64.
Have fun!
Issue Analytics
- State:
- Created a year ago
- Comments:6 (1 by maintainers)
Hi @zoomosis, thanks for the help. Note that it should be quite straightforward to build spleeter from sources adding support to python 3.10. We’ll have a look at it soon in order to provide this support.
We’ve made some dependency changes in the 2.3.2 version that should make it straightforwardly compatible with latest Ubuntu