Installation conflict for modules in python3 specifically gtk

Viewed 51

I did use the following command in my terminal:

sudo dnf install gtk4-devel

I did get the message below:

[sudo] password for XXXXXXXXXXXXX: 
Last metadata expiration check: 1:26:27 ago on Wed 12 May 2021 07:08:28 PM CDT.
Package gtk4-devel-4.2.1-1.fc34.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!

When I try to run a scrip (script to get machine information like screen size) that make use of gtk, and use to work before I switch from ubuntu18 to fedora33 (now 34) I do receive the following message

Traceback (most recent call last):
  File "/usr/lib64/python3.9/idlelib/run.py", line 559, in runcode
    exec(code, self.locals)
  File "/run/media/xxxxxxxxxx/FreeAgent Drive/01ArchivosDeBusqueda/xxxx/Proyectos/Buscador/Codigo/Codigo_de_Ejemplos/monitores.py", line 18, in <module>
    import gtk
ModuleNotFoundError: No module named 'gtk'

So I decided to run

python3 -m pip install gtk4

getting the following message

Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement gtk4 (from versions: none)
ERROR: No matching distribution found for gtk4

If using sudo dnf install is telling me that the module is already installed, how should I import it to my script: use import gtk or import gtk4 (neither work) or import?

if I type which gtk or which gtk4 it does tell me there is no module gtk

which gtk
/usr/bin/which: no gtk in (/home/xxxxxxxxxxxxxxxxxxxxx/.local/bin:/home/xxxxxxxxxxxxxxxxxxxxxx/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/var/lib/snapd/snap/bin:/opt:/opt)

which gtk4
/usr/bin/which: no gtk4 in (/home/xxxxxxxxxxxxxxxxxxxx/.local/bin:/home/xxxxxxxxxxxxxxxxxxxxx/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/var/lib/snapd/snap/bin:/opt:/opt)

So is the module installed or not? How can I verify that, if not how can I install the gtk4 what does it mean “Defaulting to user installation” I am the only user of this machine

what are “normal site-packages”

Is this condition related to permissions, if yes how to fix it for it does not happen again?

I do appreciate any help, please consider I know nothing about computers, computer systems or programing.

0 Answers
Related