[英](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) .我在我的 Cloud Function 程序(python 3.8)中使用from googleapiclient.discovery import build
。
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'我一直在寻求有关从 GCP 控制台 UI 部署 Google Cloud Function 时遇到的错误的帮助: 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
.社区提供的一些类似问题的答案是通过 pip 更新模块: 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 .因此,我无法更新或重新安装它,因为我使用的是Cloud Function web UI 。
I have already added the right requirement inside the requirements.txt file: google-api-python-client==1.2
我已经在requirements.txt文件中添加了正确的要求: google-api-python-client==1.2
Why am I using google-api-python-client 1.2?为什么我使用 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?我找不到如何解决这个ModuleNotFoundError: No module named 'googleapiclient' ,你有什么线索/建议可以分享吗?
Thank you in advance, can't wait to see what's your take on this issue:)提前谢谢你,迫不及待地想看看你对这个问题的看法:)
You can add google-api-python-client
to the requirements.txt file.您可以将google-api-python-client
添加到 requirements.txt 文件中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.