Accidentally broke my Python

So I’m new to the Suse scene but I’m liking it since it made my unstable motherboard “stable” for the most part. While installing a few ymp files I accidentally broke my Python setup and now a few systems don’t work anymore. The main one that I’d like to get working again is Lutris. I’ve tried to research and test several different ways to fix my Python, but to no success. Wine, PlayonLinux, nor Phoenicis Playonlinux don’t seem to work either. I’d rather not do a full system reinstall to try and fix it since I’ve already done a lot of work on this install. I’ll admit when I was installing one of the YMP’s, it did warn me that it might break Python. But, in my ignorance, I forced it to anyway. Lesson learned. Any help to repairing the default Python would be greatly appreciated.

Hi and welcome to this forum!

I’m afraid, more information will be needed than “While installing a few ymp files I accidentally broke my Python setup”. One would have to know what and how you installed, how you find your Python broken, etc.

However, as you said you are new to openSUSE. If you followed the standard install the file system - at least on Leap - would be BTRFS and you might have snapshots enabled. In that case you could do a

snapper rollback ###

with ### being the number of the latest “safe” snapshot.
As root a

snapper list

would help. If you get a list and find a safe place to return to, you could restart installing the packages you wanted to get when breaking your Python.

Unfortunately I entered right into tumbleweed and not from leap. The snapshots confused me, but I think i found a way to roll back to a previous version of Python install. I tried it, restarted, but same issue. So I ran

sudo lutris

in a terminal and copy/pasted the output in case this shines some light on what’s going on to someone with more knowledge (wouldn’t take much) about this then I have.

phoenix@localhost:~> sudo lutris
[sudo] password for root: 
Unable to init server: Could not connect: Connection refused
Unable to init server: Could not connect: Connection refused
Error: unable to open display 
2021-08-06 16:50:47,171: glxinfo call failed: Command ''glxinfo', '-B']' returned non-zero exit status 255.
2021-08-06 16:50:47,172: No available glxinfo output
2021-08-06 16:50:47,172: Invalid glxinfo received
2021-08-06 16:50:47,321: Failed to create DBusScreenSaverInhibitor for name org.freedesktop.ScreenSaver, path /org/freedesktop/ScreenSaver, interface org.freedesktop.ScreenSaver: g-io-error-quark: Cannot autolaunch D-Bus without X11 $DISPLAY (0)
2021-08-06 16:50:47,487: Loading of DXVK versions failed, defaulting to locally available versions
2021-08-06 16:50:47,500: Loading of DXVK versions failed, defaulting to locally available versions
2021-08-06 16:50:47,955: No cores found
Can't open display 
2021-08-06 16:50:48,200: Unable to read xrandr: Command ''xrandr']' returned non-zero exit status 1.
Traceback (most recent call last):
  File "/usr/bin/lutris", line 54, in <module>
    app = Application()  # pylint: disable=invalid-name
  File "/usr/lib/python3.8/site-packages/lutris/gui/application.py", line 79, in __init__
    ErrorDialog(_("Running Lutris as root is not recommended and may cause unexpected issues"))
  File "/usr/lib/python3.8/site-packages/lutris/gui/dialogs/__init__.py", line 100, in __init__
    super().__init__(buttons=Gtk.ButtonsType.OK, parent=parent)
  File "/usr/lib64/python3.8/site-packages/gi/overrides/__init__.py", line 319, in new_init
    return super_init_func(self, **new_kwargs)
  File "/usr/lib64/python3.8/site-packages/gi/overrides/Gtk.py", line 577, in __init__
    self._init(*args, **new_kwargs)
  File "/usr/lib64/python3.8/site-packages/gi/overrides/__init__.py", line 319, in new_init
    return super_init_func(self, **new_kwargs)
  File "/usr/lib64/python3.8/site-packages/gi/overrides/Gtk.py", line 520, in __init__
    raise RuntimeError(
RuntimeError: Gtk couldn't be initialized. Use Gtk.init_check() if you want to handle this case.

That doesn’t seem Python related…

Does Lutris require root-permissions? It is trying to open the display, so it’s a graphical program? You may try running it in your DE. If root is inevitable you may try

kdesu lutris

if you are running KDE / plasma. Similar is available for Gnome.

If root permission is avoidable, just use alt+f2 in KDE and then enter “lutris”.

Sooooo, after poking around, ended up bricking my install and had to reinstall anyway. Lesson learned… don’t hit anything that says “break…”.

Just a remark.

You say you are new to SUSE (probably meaning openSUSE), but not if you are new to Linux.
If you are already used to Linux, you know it already: never do anything as root that is not strictly needed to be done as root.