Traceback (most recent call last):
File "/home/firstguardian/.local/bin/ueberzug", line 5, in <module>
from ueberzug.__main__ import main
ModuleNotFoundError: No module named 'ueberzug'
trash-put (trash-cli) :
Traceback (most recent call last):
File "/home/firstguardian/.local/bin/trash-put", line 4, in <module>
from trashcli.put.main import main as main
ModuleNotFoundError: No module named 'trashcli.put.main'; 'trashcli.put' is not a package
Hi @firstguardian , welcome to the community! Please take a look at the introductory posts in the #start-here category if you havenât already had a chance to do so.
How was this installed? Iâd expect you installed these using pip on F36
The default version of Python has changed in F37. It is now Python 3.11
python --version
Python 3.11.0
Each version of Python installs itâs modules in a different location in your home directory:
python3.10: ~/.local/lib/python3.10/site-packages
python3.11: ~/.local/lib/python3.11/site-packages
So, the new default Python, python3.11, cannot find the modules since they werenât installed with python3.11.
So, if these were installed with pip for an older python 3.10, you need to:
either reinstall them so that python3.11 knows where to find them (simplest)
modify them to run with the older pythonâthis is not trivial because it depends on how the main script is written.
While installing Python modules, itâs best to install it in a virtual environmentâthe virtual environment remembers what version of Python was used to create it. So these issues wonât arise.
Thatâs an informative answer, thanks. I was wondering about the virtual environs.
My anecdote:
I updated my 36 Workstation to 37 just the other day as per the Fedora wiki on how to do it via dnf. One of two things that ceased to work was a virtual env for a small python project Iâve been using intermittently via a shell script that ran the python script via its virtual envâs python (for the dependencies installed and python).
It replied that the dependencies werenât installed when I tried it just after the update to 37 so I went into said venv and tried to pip install the dependencies again and it didnât know pip. Somewhat flummoxed I merely removed the venv and recreated it, reactivated it and reinstalled the deps (with pip) and then everything worked as before.
In general, stuff in virtual environments should continue to work because they include information about what python interpreter they were created with. Sometimes, as in this case, they were created with the default python, which was 3.10 before and is 3.11 in F37. That can create issues.
One can have older (but supported) versions of Python installed on Fedora releasesâthe Python SIG provides these. The difference is that one will have to run them with their explicit binaries. I have python3.7, 3.9 an 3.11 installed on my F37 here: