Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

(Cloud Function web UI) ModuleNotFoundError: No module named 'googleapiclient'

I am using from googleapiclient.discovery import build inside my Cloud Function program (python 3.8).

I've been searching for help regarding an error I get when deploying my Google Cloud Function from the GCP console UI : ModuleNotFoundError: No module named 'googleapiclient'

Some of the answers, provided by the community, to similar problems were to update the module via pip with : pip install --upgrade google-api-python-client. Therefore I'm not able to update it or re-install it since I'm using the Cloud Function web UI.

I have already added the right requirement inside the requirements.txt file : google-api-python-client==1.2

Why am I using google-api-python-client 1.2 ?
Because of this error message when I tried to use the latest version:
Build failed: gclient-service-account-auth 0.2.2 has requirement google-api-python-client==1.2, but you have google-api-python-client 1.10.1

I can't find how to solve this ModuleNotFoundError: No module named 'googleapiclient', do you have any clue/advice to share about this ?

Thank you in advance, can't wait to see what's your take on this issue :)

like image 570
Morgan Bouvet Avatar asked Dec 19 '25 11:12

Morgan Bouvet


1 Answers

You can add google-api-python-client to the requirements.txt file.

like image 166
sachith Avatar answered Dec 21 '25 01:12

sachith



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!