Issue with python-protobuf package

A python-protobuf package installs __init__py file to /lib64/python3.11/site-packages/google/ folder.

This breaks all the rest of the packages that install to “lib” instead of “lib64”
i.e. /lib/python3.11/site-packages/google/ such as:
python-google-api-core, python-google-auth, etc.

This also breaks any locally installed packages i.e. :

$ pip install google-auth --user
....
$ python
Python 3.11.11 (main, Feb 11 2025, 19:35:10) [Clang 19.1.7 (/builddir/build/BUILD/llvm-19.1.7-build/llvm-project-llvmorg-19.1 on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import google.auth
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'google.auth'

In user terms:
This breaks certbot with google dns module.
And any number of other applications that require either google api or auth implementation in python.

Solution:
Remove the __init__.py file from /lib64/python3.11/site-packages/google/ in the package itself.

This works as a workaround meanwhile too, i.e. renaming or deleting that file.

This should be safe as I have searched quite a lot of python packages and apps and haven’t found any that imports google as module directly, they all treat google as meta-module and always import google.auth, google.api, etc.
Also when installing protobuf locally, meaning: pip install protobuf --user it does not install the init file into google folder.

Cheers,

1 Like

Feel free to create an issue for the package here:

2 Likes

Issue with python-protobuf package #3238

Thanks for the report.

2 Likes