"No module named 'gnupg'" when installing protonvpn

I’m trying to yay -Syu protonvpn but I get this error:

==> Starting build()...
Traceback (most recent call last):
  File "/home/me/.cache/yay/python-proton-client/src/proton-python-client-0.7.1/setup.py", line 4, in <module>
    from proton.constants import VERSION
  File "/home/me/.cache/yay/python-proton-client/src/proton-python-client-0.7.1/proton/__init__.py", line 1, in <module>
    from .api import Session # noqa
  File "/home/me/.cache/yay/python-proton-client/src/proton-python-client-0.7.1/proton/api.py", line 5, in <module>
    import gnupg
ModuleNotFoundError: No module named 'gnupg'
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: python-proton-client

However, I have both gnupg and python-gnupg installed. If it helps, my python --version is 3.10.7.

What should I do? Searching online, apparently no one has ever had this issue before.

Are you certain about the python version? Mine was upgraded to 3.10.8 back in October. Maybe just run yay and let it upgrade everything, then try again. The package python-gunpg contains the module that proton is complaining about, so that shouldn’t be an issue. Querying the AUR does not show a build dependency on python-gnupg, either.

2 Likes

welcome at the purple fun @theissuehaver :enos:

Always do a full system update before installing new packages or building them!

Now I see what happened. My system was up-to-date. sudo pacman -Syu and yay -Syu told me there were no updates to install. Yet, as you point out, my Python was oudated.

I’m using asdf-vm to install and manage user Python versions. My ~/.tool-versions file said this:

python 3.10.7

I changed it to this (source):

python system 3.10.7

Then I ran yay -Syu protonvpn and it worked. Resolving.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.