Gajim doesn't start (Python error: importlib_metadata>=3.6)

I recently installed Gajim via flatpak/discover (version 1.6.1) and receiving the error below. Afterwards I uninstalled it and installed Gajim via Yast/zypper (version 1.1.3-bp154.1.23) and still receiving the error when starting:

Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/pkg_resources/”, line 583, in _build_master
File “/usr/lib/python3.6/site-packages/pkg_resources/”, line 900, in require
needed = self.resolve(parse_requirements(requirements))
File “/usr/lib/python3.6/site-packages/pkg_resources/”, line 791, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (importlib-metadata 1.5.0 (/usr/lib/python3.6/site-packages), Requirement.parse(‘importlib_metadata>=3.6’), {‘keyring’})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/bin/gajim”, line 6, in
from pkg_resources import load_entry_point
File “/usr/lib/python3.6/site-packages/pkg_resources/”, line 3251, in
File “/usr/lib/python3.6/site-packages/pkg_resources/”, line 3235, in _call_aside
f(*args, **kwargs)
File “/usr/lib/python3.6/site-packages/pkg_resources/”, line 3264, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File “/usr/lib/python3.6/site-packages/pkg_resources/”, line 585, in _build_master
return cls._build_from_requirements(requires)
File “/usr/lib/python3.6/site-packages/pkg_resources/”, line 598, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File “/usr/lib/python3.6/site-packages/pkg_resources/”, line 786, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The ‘importlib_metadata>=3.6’ distribution was not found and is required by keyring

I searched the web for the error but it was hard for me to understand.
I use leap 15.4 and KDE


@user11u Hi and welcome to the forum :smile:

The error is a missing python module;

pkg_resources.DistributionNotFound: The ‘importlib_metadata>=3.6’ distribution was not found and is required by keyring

A zypper search on importlib shows the missing module, so zypper in python3-importlib-metadata should resolve your issue.

Thanks for replying.
The library python3-importlib-metadata was already installed (in version 1.5.0-3.3.5 which is the one I found via zypper or yast2 software). I also installed additional libraries like python310-importlib-metadata ( python3-importlib-metadata was already installed) and python310-keyring in the hope it will help before posting the question above.
Do you (or other persons) have other ideas?

@user11u the default python in Leap 15.4 is 3.6, so installing others won’t help. The error indicates it’s using python 3.6.

I tested here on Leap 15.4 Gnome and it works…

If you create a test user and login as the test user and try running, does it work?

So you mean creating a new user e.g. in yast. logout with the current user and login with a new recently created user? Yes I did this. But it doesn’t change - so the above error is still there. I am using KDE.
Did I probably something wrong with pip or with installing other libraries?

@user11u ok, so a system issue perhaps pip (I don’t use it) may well be the issue. I would wait to see if any other gajiim users can chime in…

@malcolmlewis : OK thanks for your help. I appreciate your provided software in in the last years. Therefore I was surprised that you replied because I knew your nickname from that (

My tries before posting this thread:
I thought the tips of Any package requiring importlib-metadata breaks locking · Issue #4476 · pypa/pipenv · GitHub might help me in this case.
Therefore I tried the following pip commands (without 100% knowing what it does - which isn’t that good typically…):
pip install importlib-metadata
pip install keyring
pip install -U pipenv
pipenv install -d --skip-lock

@user11u what packages have you been using from my repos?

@user11u I suggest you look at removing pip and the items installed to see if that helps, look in you $HOME directory for remnants as well assuming you installed as your user?

Currently only your build of netactview. But in previous opensuse versions (<Leap 15.4) two or three other programs which aren’t provided for Leap 15.4 in I can’t remember the program names.

My understanding of pip is the following: install or change python stuff for the current user (because I didn’t use sudo or somtthing like this). Because of your suggestion of trying gajim with another user, I think that removing pip and the items wouldn’t help, because the new user did not have pip changes or pip installations.

@user11u ahh ok, so I suggest working with the test user and the system installed gajim, is the rror the same when started from the command line?

gajim was globally (for all users) installed via yast. I used the command line in all cases (means for all users like the normal user and the newly created user) because just opening gajim via startmenu (?) does nothing. Starting the command “gajim” via command line prints the error message I initially posted above. Answering your question, therefore the error is the same even when starting via command line.

@user11u Have a look here Welcome - openSUSE Build Service on the right are all the requires, they should be installed? It may be one of the typelibs.


The required and recommended packages are almost all installed. To be more specise: for packages that give us a choice either one of them is installed (means XOR - e.g. python3-pycryptodome xor python3-pycrypto).
Only “typelib-1_0-Gst-1_0-32bit - Streaming-Media Framework Runtime” wasn’t installed but it wasn’t a game-changer after installing…

@malcolmlewis It works now. Thank you, you helped a lot (see below). The thread can be closed.

Short answer: I installed a package “python3-importlib-metadata” from with a version a little above the requirement in the errormessage (‘importlib_metadata>=3.6’ ).

Detailed answer: I tried to understand what the the parts of the error message means: On the one side “pkg_resources.DistributionNotFound” - so I searched for that. And on the other side the python site from importlib_metadata to understand which versions are available. And I tried to understand what the >= in “importlib_metadata>=3.6” means.
The “penny has dropped” with the result of pkg_resources.DistributionNotFound: The 'rospkg==1.2.3' distribution was not found and is required by the application - ROS Answers: Open Source Q&A Forum because I understood what to do when reading something like “pip3 install rospkg==1.2.8”
So I looked up in the for that.
With your given link (Welcome - openSUSE Build Service) I knew that I had to choose the python3 and not the python module etc.

The installed “python3-importlib-metadata” wasn’t listed in your given build service (see recent link).

This file does nor exist unless file name was mangled. It is shown as bold in your post which should not be the case for the verbatim copy-paste of computer text.

Show full output of zypper se -si keyring. And please, without any fancy formatting, just as pre-formatted text.

@arvidjaar It works now - as I posted one comment earlier. We were probably typing the same time…

But here are the results of your suggestion:

S  | Name              | Type  | Version             | Arch   | Repository
i+ | python3-keyring   | packet | 23.9.3-lp154.103.1  | noarch | devel:languages:python
i+ | python310-keyring | packet | 23.13.1-lp154.119.2 | noarch | home:Simmphonie:python310

You do realize that you are converting Leap 15.4 into do-it-yourself distribution and that there are less and less chances that anyone will be able (or even interested) to help with such installation, do not you?

I just installed gajim on Leap 15.4 and it starts just fine. You have at least one Python module (keyring) from development repository which means it very likely has higher requirements than those provided by Leap 15.4. And you did not even mention it before, so nobody could guess it.

When you mark your question leap-154 we expect you are using Leap 15.4. When you have replaced packages from Leap 15.4 with packages from third-party repositories, at least tell it clearly from the very beginning.