Install Demucs on Linux
You will type a few commands into a terminal. This page tells you what to type and what you should see.
First, open a terminal
A terminal is a window where you type commands instead of clicking. On many Linux desktops, Ctrl + Alt + T opens one. If that does nothing, search your app menu for "Terminal".
Type a command, press Enter, and wait until a new line with a blinking cursor appears. That means it finished.
What you will end up with
A demucs command that works from any folder. Give it a song and it writes four files next to it: vocals, drums, bass and other. The next page walks through that part.
The steps
There are two ways. Both need an internet connection and some free disk space. Pick one.
Option A: the quickest way (the official uv way)
uv is a small tool that fetches and runs Python programs for you. The official Linux page uses it. Install uv:
curl -LsSf https://astral.sh/uv/install.sh | sh
Open a new terminal so the uv command is found, then split a song. Replace the name with your own file:
uvx --python 3.12 --with numpy demucs "your-song.mp3"
The --python 3.12 part matters on a machine with no Python of its own: without it uv fetches the newest Python (3.15 at the time of our test), Demucs 4.1.0 does not install there, and the run fails with FileNotFoundError ... requirements_minimal.txt. Where Python 3.12 is already installed it changes nothing; otherwise uv downloads its own copy once.
Heads up: this downloads the large GPU build of PyTorch (about 3 GB), even on a machine without an NVIDIA graphics card. It still runs fine on the normal processor. If that download is too big for you, use option B.
Option B: smaller download, no NVIDIA card
This one downloads about 196 MB for PyTorch instead of about 3 GB. It uses Python and a "virtual environment", a private folder so nothing else on your computer is touched. You need Python 3.10 or newer.
On Ubuntu or Debian, install the virtual-environment tool first (a fresh Ubuntu 24.04 does not have it, and the first line below fails with "ensurepip is not available"):
sudo apt install python3-venv
python3 -m venv demucs-env
source demucs-env/bin/activate
pip install torch --index-url https://download.pytorch.org/whl/cpu
pip install -U demucs
pip install numpy
demucs "your-song.mp3"
Next time, run source demucs-env/bin/activate first, then demucs "your-song.mp3".
Tested by us on 2026-10-12 (demucs 4.1.0, Python 3.11 and 3.12, CPU only). Both options produced four stem files from a 10-second clip. Each took under a minute on a fast connection.
Why is numpy in there?
The published version of Demucs (4.1.0) forgets to list numpy, a Python package it needs. Without it, the first run stops with ModuleNotFoundError: No module named 'numpy'. We hit this on both options and adding numpy fixed it. Details on the Fixes page. If a newer version of Demucs fixes it, the extra bit does no harm. Problems with Demucs itself go to the official repo.
Good to know
- The first time you run Demucs it downloads the model files. Later runs reuse them.
- On a machine without an NVIDIA graphics card, a plain install can download a lot of GPU software you will not use. The fix is on the Fixes page.
- MP3 files work without ffmpeg in this version (we tested it). ffmpeg is only needed for flac output and unusual formats.
Stuck? Check Fixes first. The official repo, adefossez/demucs, has issues turned off; older reports live on facebookresearch/demucs.