google-cloud-python: `protobuf-3.0.0` is missing `_ _init_ _.py`, and is not recognized by Python v2.7.6

From Python 2.7.6., the package results in the following error:

ImportError: No module named google.protobuf

In order to get the package to become discoverable, I had to add an empty __init__.py file to the site-packages/google directory.

touch /usr/local/lib/python2.7/site-packages/google/__init__.py

Here is the stackoverflow post that led me to the solution, and it is also the post that directs everyone to use the google package that is incorrectly attributed to you (#4345).

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 24 (11 by maintainers)

Most upvoted comments

@dhermes Thank you for the excellent description of the problem in your last comment. Now that we have root caused the problem and you have identified the solution I consider this issue Closed.

I am sorry for being so persistent, but you had marked this issue closed < 2 mins after it was opened and long before you arrived at your first, incorrect guesses.

Guess 1.

So the usage of a non-namespace package (google) colliding with our packages is causing all of the issues.

Guess 2.

The issue is with the package list.

I think it’s reasonable to say, you closed the issue long before you understood my problem. Ultimately, you were correct and your packages were just fine. However, when someone can’t consume your packages when doing a reasonable (albeit naive) progression, it is YOUR problem. If people can’t consume your code, that’s a problem.

Once indexed, I think this long and thorough discussion will help several others who may well run into this EXACT same problem. Again, I really do appreciate your time and effort, thank you for walking me through this problem.

@dhermes This issue is not related to #4345