The missing package is: dev-python/grpcio See: https://github.com/googleapis/python-api-core/blob/main/setup.py#L37 Example of failure: bash$ ./generativeai_official.py File "./generativeai_official.py", line 21, in <module> import google.generativeai as palm File "/usr/lib/python3.11/site-packages/google/generativeai/__init__.py", line 71, in <module> from google.generativeai import types File "/usr/lib/python3.11/site-packages/google/generativeai/types/__init__.py", line 17, in <module> from google.generativeai.types.discuss_types import * File "/usr/lib/python3.11/site-packages/google/generativeai/types/discuss_types.py", line 21, in <module> import google.ai.generativelanguage as glm File "/usr/lib/python3.11/site-packages/google/ai/generativelanguage/__init__.py", line 21, in <module> from google.ai.generativelanguage_v1beta3.services.discuss_service.async_client import ( File "/usr/lib/python3.11/site-packages/google/ai/generativelanguage_v1beta3/__init__.py", line 21, in <module> from .services.discuss_service import DiscussServiceAsyncClient, DiscussServiceClient File "/usr/lib/python3.11/site-packages/google/ai/generativelanguage_v1beta3/services/discuss_service/__init__.py", line 16, in <module> from .async_client import DiscussServiceAsyncClient File "/usr/lib/python3.11/site-packages/google/ai/generativelanguage_v1beta3/services/discuss_service/async_client.py", line 32, in <module> from google.api_core import gapic_v1 File "/usr/lib/python3.11/site-packages/google/api_core/gapic_v1/__init__.py", line 16, in <module> from google.api_core.gapic_v1 import config File "/usr/lib/python3.11/site-packages/google/api_core/gapic_v1/config.py", line 23, in <module> import grpc ModuleNotFoundError: No module named 'grpc'
Created attachment 878189 [details] emerge --info
it should be available via "grpc" use flag probably, see: https://github.com/googleapis/python-api-core/blob/main/setup.py#L38 Note: grpcio-status is optional, see: python-api-core-2.17.1/google/api_core/exceptions.py try: import grpc try: from grpc_status import rpc_status except ImportError: # pragma: NO COVER warnings.warn( "Please install grpcio-status to obtain helpful grpc error messages.", ImportWarning, ) rpc_status = None
For the record, I'm opposed to adding an explicit dependency on dev-python/grpcio because grpcio packages in Gentoo are unmaintained and don't have working tests.
grpcio has been last rited now.