You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
google/protobuf is a key dependency of python grpc.
Shortly, gRPC-based will be published that contain either a top-level 'google' package, and in some cases other modules in the google/protobuf package.
At the moment using, any of these other packages will generally fail because the protobuf package is installed
the other google package will contain modules with the google package (sometimes in google/protobuf)
when the protobuf package is installed, both google and google/protobuf end up being resolved to the protobuf package
other paths on the sys.path are not searched
The result is importing modules from the other packages ends with 'No module named logging.v1' for snippets like:
fromgoogle.logging.v1import ....
There is well-known way to resolve this using pkgutil
Use pkgutil.extend_path inside the init.py of the google and google/protobuf packages
E.g,
This is one of those issues that I'd be happy to accept a PR for. The only reason I haven't fixed it already is because the Python packaging ecosystem is (to me) really complicated and subtle, and so it often takes a lot of background research for me to determine exactly what the right fix is.
google/protobuf is a key dependency of python grpc.
Shortly, gRPC-based will be published that contain either a top-level 'google' package, and in some cases other modules in the google/protobuf package.
At the moment using, any of these other packages will generally fail because the protobuf package is installed
The result is importing modules from the other packages ends with 'No module named logging.v1' for snippets like:
There is well-known way to resolve this using pkgutil
E.g,
A good online resource explaining this use of pkgutil is available at pymotw:pkgutil
The text was updated successfully, but these errors were encountered: