• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Help getting python code running with python 3 (with GUI)

Hitman928

Diamond Member
Hi,

I am not a programmer nor an expert with Linux, but have a task to get code that was written for python2 to run on python3. Alternatively I could just use python2 if I could figure out how to get pygtk installed/running with RHEL8.

When I try to run the script using python 2, I get the following error: ImportError: No module named pygtk. Obviously pygtk isn't installed or else isn't configured properly but I cannot figure out how to get it installed/configured correctly.

I found this:

https://askubuntu.com/questions/697397/python3-is-not-supporting-gtk-module

But trying to put the suggested lines into the script doesn't help, I get the following error: No module named gi. Perhaps I am not doing it correctly though (just put the lines at the start of the python script).

Any help with this would be greatly appreciated.
 
Google search for "how to install pip" and "how to install python modules using pip" - the exact command you'll use will be something along the lines of "python -m pip install pygtk" but there's some prerequisite steps first that can differ from system to system.

Afaik those libraries aren't part of the standard python installation, so yeah.
 
Back
Top