Gnome tweaks doesn't open

BTW, sudo pacman -Qk python would show if the python package is broken (something like this can happen due to the instllation of a second python)

I did sudo pacman -S python but same errors as previously…

[nath@nath-b550gamingxv2 ~]$ sudo pacman -Qk python
[sudo] Mot de passe de nath : 
python : 3066 fichiers au total, 0 fichier manquant
[nath@nath-b550gamingxv2 ~]$ 

In french, it means there isn’t any missing file

Hm. gi is a Python core module, AFAIK.

Enter a Python shell

python

and enter

import gi

[nath@nath-b550gamingxv2 ~]$ python
Python 3.13.3 (main, Apr  9 2025, 07:44:25) [GCC 14.2.1 20250207] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import gi
>>> 

I logout after doing exit in the python shell, and it didn’t change anything too…

At least python looks ok

Please show

ls -l /usr/bin/python*

type -a gnome-tweaks

sudo pacman -Qk gnome-tweaks

python3 /usr/bin/gnome-tweaks
[nath@nath-b550gamingxv2 ~]$ ls -l /usr/bin/python*
lrwxrwxrwx 1 root root     7  9 avril 09:44 /usr/bin/python -> python3
lrwxrwxrwx 1 root root    10  9 avril 09:44 /usr/bin/python3 -> python3.13
-rwxr-xr-x 1 root root 14352  9 avril 09:44 /usr/bin/python3.13
-rwxr-xr-x 1 root root  3446  9 avril 09:44 /usr/bin/python3.13-config
lrwxrwxrwx 1 root root    17  9 avril 09:44 /usr/bin/python3-config -> python3.13-config
-rwxr-xr-x 1 root root   262  4 févr. 11:04 /usr/bin/python-argcomplete-check-easy-install-script
lrwxrwxrwx 1 root root    14  9 avril 09:44 /usr/bin/python-config -> python3-config
[nath@nath-b550gamingxv2 ~]$ type -a gnome-tweaks
gnome-tweaks est /usr/bin/gnome-tweaks
[nath@nath-b550gamingxv2 ~]$ sudo pacman -Qk gnome-tweaks
[sudo] Mot de passe de nath : 
gnome-tweaks : 302 fichiers au total, 0 fichier manquant
[nath@nath-b550gamingxv2 ~]$ python3 /usr/bin/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 ~]$ 

sudo pacman -S python-gobject

Actually it should be installed already …

Yeah, it was already installed :

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

Paquet (1)            Ancienne version  Nouvelle version  Changement net

extra/python-gobject  3.52.3-3          3.52.3-3                0,00 MiB

Taille totale installée :      1,41 MiB
Taille de mise à jour nette :  0,00 MiB

:: Procéder à l’installation ? [O/n] o
(1/1) vérification des clés dans le trousseau                                                 [------------------------------------------------------] 100%
(1/1) vérification de l’intégrité des paquets                                                 [------------------------------------------------------] 100%
(1/1) chargement des fichiers des paquets                                                     [------------------------------------------------------] 100%
(1/1) analyse des conflits entre fichiers                                                     [------------------------------------------------------] 100%
:: Traitement des changements du paquet…
(1/1) réinstallation python-gobject                                                           [------------------------------------------------------] 100%
:: Exécution des crochets (« hooks ») de post-transaction…
(1/2) Arming ConditionNeedsUpdate...
(2/2) Checking which packages need to be rebuilt
[nath@nath-b550gamingxv2 ~]$ 

This is all strange. Make a last test with python3 /usr/bin/gnome-tweaks

I have no idea. Did you do things with Python before? Python venv or whatever?

Perhaps defining a second user

  • then login with the new user
  • and try gnome-tweaks

to see if something in your user environment is weird

One additional comment.

I have installed

gobject-introspection 1.84.0-1
gobject-introspection-runtime 1.84.0-1
python-gobject 3.52.3-3

I remember I installed BCML, a mod loader for a video game. Here is the link :

It was hard but I successfully installed it.
Also, here is the output for reinstalling python3 and gnome-tweaks :

[nath@nath-b550gamingxv2 ~]$ sudo pacman -S python3
[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

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

Taille totale installée :      67,42 MiB
Taille de mise à jour nette :   0,00 MiB

:: Procéder à l’installation ? [O/n] o
(1/1) vérification des clés dans le trousseau                                                 [------------------------------------------------------] 100%
(1/1) vérification de l’intégrité des paquets                                                 [------------------------------------------------------] 100%
(1/1) chargement des fichiers des paquets                                                     [------------------------------------------------------] 100%
(1/1) analyse des conflits entre fichiers                                                     [------------------------------------------------------] 100%
:: Traitement des changements du paquet…
(1/1) réinstallation python                                                                   [------------------------------------------------------] 100%
:: Exécution des crochets (« hooks ») de post-transaction…
(1/2) Arming ConditionNeedsUpdate...
(2/2) Checking which packages need to be rebuilt
[nath@nath-b550gamingxv2 ~]$ sudo pacman -S gnome-tweaks
avertissement : gnome-tweaks-46.1-2 est à jour -- réinstallation
résolution des dépendances…
recherche des conflits entre paquets…

Paquet (1)          Ancienne version  Nouvelle version  Changement net

extra/gnome-tweaks  46.1-2            46.1-2                  0,00 MiB

Taille totale installée :      1,47 MiB
Taille de mise à jour nette :  0,00 MiB

:: Procéder à l’installation ? [O/n] o
(1/1) vérification des clés dans le trousseau                                                 [------------------------------------------------------] 100%
(1/1) vérification de l’intégrité des paquets                                                 [------------------------------------------------------] 100%
(1/1) chargement des fichiers des paquets                                                     [------------------------------------------------------] 100%
(1/1) analyse des conflits entre fichiers                                                     [------------------------------------------------------] 100%
:: Traitement des changements du paquet…
(1/1) réinstallation gnome-tweaks                                                             [------------------------------------------------------] 100%
:: Exécution des crochets (« hooks ») de post-transaction…
(1/5) Arming ConditionNeedsUpdate...
(2/5) Compiling GSettings XML schema files...
(3/5) Updating icon theme caches...
(4/5) Checking which packages need to be rebuilt
(5/5) Updating the desktop file MIME type cache...
[nath@nath-b550gamingxv2 ~]$ 

And now, I just installed the 3 packages you talked about, but it seems I already have them :

[nath@nath-b550gamingxv2 ~]$ sudo pacman -S gobject-introspection 
avertissement : gobject-introspection-1.84.0-1 est à jour -- réinstallation
résolution des dépendances…
recherche des conflits entre paquets…

Paquet (1)                   Ancienne version  Nouvelle version  Changement net

extra/gobject-introspection  1.84.0-1          1.84.0-1                0,00 MiB

Taille totale installée :      3,06 MiB
Taille de mise à jour nette :  0,00 MiB

:: Procéder à l’installation ? [O/n] o
(1/1) vérification des clés dans le trousseau                                                 [------------------------------------------------------] 100%
(1/1) vérification de l’intégrité des paquets                                                 [------------------------------------------------------] 100%
(1/1) chargement des fichiers des paquets                                                     [------------------------------------------------------] 100%
(1/1) analyse des conflits entre fichiers                                                     [------------------------------------------------------] 100%
:: Traitement des changements du paquet…
(1/1) réinstallation gobject-introspection                                                    [------------------------------------------------------] 100%
:: Exécution des crochets (« hooks ») de post-transaction…
(1/2) Arming ConditionNeedsUpdate...
(2/2) Checking which packages need to be rebuilt
[nath@nath-b550gamingxv2 ~]$ sudo pacman -S gobject-introspection-runtime
avertissement : gobject-introspection-runtime-1.84.0-1 est à jour -- réinstallation
résolution des dépendances…
recherche des conflits entre paquets…

Paquet (1)                           Ancienne version  Nouvelle version  Changement net

extra/gobject-introspection-runtime  1.84.0-1          1.84.0-1                0,00 MiB

Taille totale installée :      0,15 MiB
Taille de mise à jour nette :  0,00 MiB

:: Procéder à l’installation ? [O/n] o
(1/1) vérification des clés dans le trousseau                                                 [------------------------------------------------------] 100%
(1/1) vérification de l’intégrité des paquets                                                 [------------------------------------------------------] 100%
(1/1) chargement des fichiers des paquets                                                     [------------------------------------------------------] 100%
(1/1) analyse des conflits entre fichiers                                                     [------------------------------------------------------] 100%
:: Traitement des changements du paquet…
(1/1) réinstallation gobject-introspection-runtime                                            [------------------------------------------------------] 100%
:: Exécution des crochets (« hooks ») de post-transaction…
(1/2) Arming ConditionNeedsUpdate...
(2/2) Checking which packages need to be rebuilt
[nath@nath-b550gamingxv2 ~]$ sudo pacman -S python-gobject
avertissement : python-gobject-3.52.3-3 est à jour -- réinstallation
résolution des dépendances…
recherche des conflits entre paquets…

Paquet (1)            Ancienne version  Nouvelle version  Changement net

extra/python-gobject  3.52.3-3          3.52.3-3                0,00 MiB

Taille totale installée :      1,41 MiB
Taille de mise à jour nette :  0,00 MiB

:: Procéder à l’installation ? [O/n] o
(1/1) vérification des clés dans le trousseau                                                 [------------------------------------------------------] 100%
(1/1) vérification de l’intégrité des paquets                                                 [------------------------------------------------------] 100%
(1/1) chargement des fichiers des paquets                                                     [------------------------------------------------------] 100%
(1/1) analyse des conflits entre fichiers                                                     [------------------------------------------------------] 100%
:: Traitement des changements du paquet…
(1/1) réinstallation python-gobject                                                           [------------------------------------------------------] 100%
:: Exécution des crochets (« hooks ») de post-transaction…
(1/2) Arming ConditionNeedsUpdate...
(2/2) Checking which packages need to be rebuilt
[nath@nath-b550gamingxv2 ~]$ 

This most likely happens because of messing with pyenv/venv while installing BCML, so proper python modules could not be loaded. Also, it does not help that gnome-tweaks uses #!/usr/bin/env python3 in the shebeng.

You can try the following:

first load the python shell

 /usr/bin/python3.13

then enter this in the shell

exec(open('/usr/bin/gnome-tweaks').read())
1 Like

It worked !!!

But I can’t open it without using this command… :confused:
Is it possible to set up a service, or something like that to resolve the issue ?

I give you the output of the command if it could be useful :

[nath@nath-b550gamingxv2 ~]$ python
Python 3.13.3 (main, Apr  9 2025, 07:44:25) [GCC 14.2.1 20250207] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> exec(open('/usr/bin/gnome-tweaks').read())
WARNING : Error loading desktop file: /home/nath/.config/autostart/lunarclient.desktop
[nath@nath-b550gamingxv2 ~]$ python
Python 3.13.3 (main, Apr  9 2025, 07:44:25) [GCC 14.2.1 20250207] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> exec(open('/usr/bin/gnome-tweaks').read())
WARNING : Error loading desktop file: /home/nath/.config/autostart/lunarclient.desktop


As @jake99 pointed out, you could have some pyenv/venv stuff somewhere.

Check you shell’s config to see if this is the cause.

If all is ok here: Did you try with a different (newly created) user?

Okay, and how can I verify my shell config ?
And I never used a new user on this pc

Look into the config files of the shell. Presumably, you are using bash. Possible files here are

  • ~/.bahrc
  • ~/bash_profile
  • ~/.profile

There could be some more but these are the important ones.

https://wiki.archlinux.org/title/Bash gives also some information.

Regarding test with another user: create another user, login with the other user and test gnome-tweaks

Here is .bashrc :

[[ $- != *i* ]] && return

alias ls='ls --color=auto'
alias grep='grep --color=auto'
PS1='[\u@\h \W]\$ '

uwufetch

.bash_profile :

#
# ~/.bash_profile
#

[[ -f ~/.bashrc ]] && . ~/.bashrc

And I don’t have any “.profile” file into my home folder…

I just created a new user, but same issue… Even if I try to open it on a shell with gnome-tweaks

Please paste the output of env