question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Discussion] Using Spleeter under Ubuntu 22.04 LTS

See original GitHub issue

Spleeter (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:closed
  • Created a year ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
romi1502commented, Apr 29, 2022

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.

0reactions
mmoussallamcommented, Sep 7, 2022

We’ve made some dependency changes in the 2.3.2 version that should make it straightforwardly compatible with latest Ubuntu

Read more comments on GitHub >

github_iconTop Results From Across the Web

spleeter · PyPI
Spleeter is Deezer source separation library with pretrained models written in Python and uses Tensorflow. It makes it easy to train source separation...
Read more >
multimedia-mixing_0.10_all.deb Ubuntu 22.04 LTS Download
Download multimedia-mixing_0.10_all.deb for Ubuntu 22.04 LTS from Ubuntu Universe repository.
Read more >
deezer - Bountysource
[Discussion] Spleeter works natively on Apple Silicon Macs if you use ... It is possible to install Python 3.9 from the Ubuntu 22.04...
Read more >
Ubuntu 22.04 LTS – what's new for the world's most popular ...
The latest Linux Desktop release delivers improved performance, fully-featured Active Directory integration and expanded Raspberry Pi ...
Read more >
How to Upgrade from Ubuntu 20.04 LTS to Ubuntu 22.04 LTS
1. It is prudent to take a backup of all your databases and files before embarking on any major upgrade of an operating...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found