Gnome tweaks doesn't open

Hello
Since a few weeks, I noticed that gnome-tweaks can’t be open. I try to reinstall it, and even install a new version of python with yay -S python312, but it doesn’t works at all…
Can someone help me ?
(and sorry for my bad english :sweat_smile:)

Does it work if you try and open it in the terminal.

No. Here is the output :

[nath@nath-b550gamingxv2 ~]$ gnome-tweaks
Traceback (most recent call last):
  File "/usr/bin/gnome-tweaks", line 13, in <module>
    import gi
ModuleNotFoundError: No module named 'gi'
[nath@nath-b550gamingxv2 ~]$ 

Try: sudo pacman -Syu python-gobject
Reboot.

I already tried it, it doesn’t change anything.
As you can see on the following picture, my python-gobject package was already up to date.

I tried it just in case, but it didn’t work.

1 Like

In a newly installed gnome it is OK. Check
extra/gobject-introspection 1.84.0-1 (517.0 KiB 3.1 MiB) (Installed)

It’s weird because it worked previously…
I just installed your package (with sudo pacman -S gobject-introspection), I reboot my computer, but it doesn’t change anything too :confused:

IDK it might depend on multiple python versions
python --version
Python 3.13.3
edit:
core/python 3.13.3-1 (12.2 MiB 67.4 MiB) (Installed)
here.
should you have python2 as well consider uninstalling it and reinstall
gnome-tweaks

Install python from core. python312 is from AUR and it seems it doesn’t work properly with gnome-tweaks.

I don’t think I have this “python2” package
Here’s the list of some of my packages who seems to be related to python, I found them with sudo pacman -Q :

pv 1.9.31-1
pystring 1.1.4-2
python 3.13.3-1
python-aiohappyeyeballs 2.6.1-1
python-aiohttp 3.12.4-1
python-aiosignal 1.3.2-1
python-annotated-types 0.7.0-2
python-argcomplete 3.5.3-1
python-attrs 24.1.0-1
python-autocommand 2.2.2-7
python-bcrypt 4.3.0-1
python-beautifulsoup4 4.13.3-1
python-cairo 1.28.0-1
python-capng 0.8.5-3
python-certifi 2025.04.26-1
python-cffi 1.17.1-2
python-chardet 5.2.0-6
python-charset-normalizer 3.4.2-1
python-colorama 0.4.6-5
python-cryptography 45.0.3-1
python-dbus 1.4.0-1
python-defusedxml 0.7.1-7
python-distro 1.9.0-3
python-evdev 1.9.0-1
python-frozenlist 1.6.0-1
python-gnupg 0.5.4-2
python-gobject 3.52.3-3
python-idna 3.10-2
python-importlib-metadata 8.7.0-1
python-inflect 7.5.0-1
python-jaraco.classes 3.4.0-2
python-jaraco.collections 5.1.0-1
python-jaraco.context 6.0.1-1
python-jaraco.functools 4.1.0-1
python-jaraco.text 4.0.0-2
python-jeepney 0.9.0-1
python-jinja 1:3.1.6-1
python-keyring 25.6.0-1
python-lxml 5.4.0-1
python-mako 1.3.10-1
python-markdown 3.8-1
python-markupsafe 3.0.2-1
python-moddb 0.12.0-1
python-more-itertools 10.7.0-1
python-multidict 6.4.4-1
python-orjson 3.10.18-1
python-packaging 25.0-1
python-pillow 11.2.1-1
python-platformdirs 4.3.6-2
python-propcache 0.3.1-1
python-proton-core 0.4.0-4
python-proton-keyring-linux 0.2.0-4
python-proton-vpn-api-core 0.42.4-1
python-proton-vpn-local-agent 1.4.5-1
python-proton-vpn-network-manager 0.12.13-1
python-psutil 7.0.0-1
python-pulsectl 1:24.12.0-1
python-pyaml 24.12.0-1
python-pycparser 2.22-3
python-pycups 2.0.4-3
python-pydantic 2.11.5-1
python-pydantic-core 2:2.33.2-2
python-pynacl 1.5.0-3
python-pyopenssl 25.0.0-1
python-pyqt5 5.15.11-2
python-pyqt5-sip 12.17.0-1
python-pyqt6 6.9.0-2
python-pyqt6-sip 13.10.2-1
python-pyqt6-webengine 6.9.0-1

Okay, and how should I do that ?

Try

sudo pacman -S python
sudo pacman -R python312

It seems I already have the latest package for python :

[nath@nath-b550gamingxv2 ~]$ sudo pacman -S python
[sudo] Mot de passe de nath : 
avertissement : python-3.13.3-1 est à jour -- réinstallation
résolution des dépendances…
recherche des conflits entre paquets…

Paquet (1)   Ancienne version  Nouvelle version  Changement net  Taille du téléchargement

core/python  3.13.3-1          3.13.3-1                0,00 MiB                 12,25 MiB

Taille totale du téléchargement :  12,25 MiB
Taille totale installée :          67,42 MiB
Taille de mise à jour nette :       0,00 MiB

:: Procéder à l’installation ? [O/n] 

But I follow your instruction and delete python312, it doesn’t change anything. Maybe I should try after a reboot ?

Yes, remove python312 and then either logout/login or reboot.

Hmm it doesn’t change anything too after a logout :smiling_face_with_tear:

In a shell enter

type -a python

pacman -Qo /usr/bin/python

Here is the output :

[nath@nath-b550gamingxv2 ~]$ type -a python
python est /usr/bin/python
[nath@nath-b550gamingxv2 ~]$ pacman -Qo /usr/bin/python
/usr/bin/python appartient à python 3.13.3-1
[nath@nath-b550gamingxv2 ~]$ 

Looks good. When starting gnome tweaks from shell do you get the same errors as before?

Could also be a good idea to reinstall python: sudo pacman python

Yep

[nath@nath-b550gamingxv2 ~]$ gnome-tweaks
Traceback (most recent call last):
  File "/usr/bin/gnome-tweaks", line 13, in <module>
    import gi
ModuleNotFoundError: No module named 'gi'
[nath@nath-b550gamingxv2 ~]$