Cannot install python libraries

Hello everyone!
For a few months, I have been using Ultimate_vocal_remover_GUI, without any problem. Today I tried to use it ($ python UVR.py) and some python libraries are missing:
audioread
librosa
natsort
pyglet
soundfile
torch
wget
matchering
gui_data.app_size_values
kthread

I ran the commands…

sudo pacman -Syu
sudo pacman -Sy
sudo pacman -S python-pip
sudo pacman -S --noconfirm tk
sudo pacman -S ffmpeg

…to install any necessary library, but I have still the same error.
I found some of them in AUR (Arch linux user repository) and I dont know how to install them. Actually I have never used AUR before.
Is there any command, to install all the necessary libraries?
Is it better to install all of them manually?
Is my Computer too old for the latest versions of these libraries (intel i5 100400f, Gigabyte GeForce GTX 1050 Ti 4GB, 16GB RAM)?
Thanks for the attention!

(If anyone is looking for an application on separating vocals and music from a song, I highly recommend UVR)

What is the exact error you are getting in the terminal?
I’m not an expert but having the exact error will help more experienced and is easier in general for searching for answers :grinning:

According to the documentation pacman -S package_name is the command for installing the package.

This is also good to follow if you really do need the AUR, the Arch Linux wiki has good details → AUR (installing and upgrading packages)

However the AUR has problems and is not a magic pill so should be used with caution.

1 Like

Thank you TC_neva, for your respond, for the advises and the tutorial about AUR

When I am in the folder where UVR is extracted, I have to run a file named ‘UVER.py’, so I type the simple command $ python UVR.py and the output is:

Traceback (most recent call last):
  File "/home/stathis/ultimatevocalremovergui-master/UVR.py", line 4, in <module>
    import audioread
ModuleNotFoundError: No module named 'audioread'

So I put in comment the command import audioread from the ‘UVR.py’ file to check also if other libraries are missing. If you need more information about the code of UVR.py click here.

Here are the outputs every time I put in comment any Import command:
# import audioread

Traceback (most recent call last):
  File "/home/stathis/ultimatevocalremovergui-master/UVR.py", line 8, in <module>
    import librosa
ModuleNotFoundError: No module named 'librosa'

# import librosa

Traceback (most recent call last):
  File "/home/stathis/ultimatevocalremovergui-master/UVR.py", line 10, in <module>
    import natsort
ModuleNotFoundError: No module named 'natsort'

# import natsort

Traceback (most recent call last):
  File "/home/stathis/ultimatevocalremovergui-master/UVR.py", line 14, in <module>
    from pyglet import font as pyglet_font
ModuleNotFoundError: No module named 'pyglet'

The rest of the missing libraries are written above.

About the AUR:
I started with the library audioread.
I ran the command
$ git clone https://aur.archlinux.org/python-audioread.git
and the output was

Cloning into 'python-audioread'...
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: 	git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: 	git branch -m <name>
remote: Enumerating objects: 41, done.
remote: Counting objects: 100% (41/41), done.
remote: Compressing objects: 100% (34/34), done.
remote: Total 41 (delta 6), reused 41 (delta 6), pack-reused 0 (from 0)
Receiving objects: 100% (41/41), 8.47 KiB | 8.47 MiB/s, done.
Resolving deltas: 100% (6/6), done.

which is not enough because I have the same output when I run $ python UVR.py. Is there anything else I have to do?
Ask me about more details if it’s necessary!

Hi @Stathis_Kan_i5,
I wonder whether you can read the stable update post in order to solve your problem.
[Stable Update] 2024-05-29 - Kernels, Plasma 6.0.5, GNOME 46.2, Mesa

They post instructions about the python AUR packages update from 3.11 to 3.12.

Hope it help, regards

and ? for install python lib it’s the next line in doc :wink: with ./install_packages.sh

BUT: it’s not good to install python packages by pip in manjaro. very very bad and you can even break your distribution

The best solution is to use venv (ok, it’s not simple)


It’s not a command for install an aur package :wink: as above, you stop halfway through the installation
And it’s a solution only if all python packages are in aur…

1 Like

Lucky for you, you didn’t try to follow the second part of the guide and butcher your installation like it advised to.

What you should do is something like this:

# pull the repo or get the tarball. change to its dir
# target version for windows
pyenv install 3.9.8
pyenv local 3.9.8
pyenv exec python -m venv .venv
# using fish shell
source .venv/bin/activate.fish
pip install wheel
# sklearn is deprecated, but used as dependency
SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True pip install -r requirements.txt
1 Like

You will need to rebuild any python packages installed before the update from Python 3.11 (or earlier) to 3.12

You can look in:
/usr/lib/python3.11
Any in that folder will need to be rebuilt so it ends up in the folder:
/usr/lib/python3.12

1 Like

Could you give me more information about rebuilding the packages?
In the directory /usr/lib/python3.11/site-packages/ I have 9 folders:

  1. Manjaro
  2. manjaro_sdk-0.1.1.dist-info
  3. mock
  4. mock-3.0.5-py3.11.egg-info
  5. PySide2
  6. PySide2.egg-info/
  7. shiboken2
  8. shiboken2.egg-info
  9. shiboken2_generator

What can I do?

What do you mean ‘target version for windows’?

remove orphans (with pamac more easy or pacman) :wink:

Dependencies cannot be satisfied under 3.12. So instead of trying all the versions, just target the one that you know it works on.

There are a multiple ways you can rebuild AUR packages.
One easy way is to run ‘yay’.

It is available from the Official Repositories (extra).