diff --git a/google/ads/googleads/client.py b/google/ads/googleads/client.py index 671f5263f..007f8e445 100644 --- a/google/ads/googleads/client.py +++ b/google/ads/googleads/client.py @@ -36,7 +36,10 @@ # Retrieve the version of this client library to be sent in the user-agent # information of API calls. -_CLIENT_INFO = ClientInfo(client_library_version=metadata.version("google-ads")) +try: + _CLIENT_INFO = ClientInfo(client_library_version=metadata.version("google-ads")) +except metadata.PackageNotFoundError: + _CLIENT_INFO = ClientInfo() # See options at grpc.github.io/grpc/core/group__grpc__arg__keys.html _GRPC_CHANNEL_OPTIONS = [