简体   繁体   English

firebase-admin`导入时找不到模块

[英]`firebase-admin` ModuleNotFound on import

As detailed on the GoogleCloudPlatform Github issue , the following fails with a ModuleNotFound : 正如有关GoogleCloudPlatform Github的问题所详述的那样,以下失败并带有ModuleNotFound

$ virtualenv env
$ env/bin/pip install firebase-admin google-cloud-storage
$ env/bin/python -c 'from firebase_admin import storage'
Traceback ... ModuleNotFoundError

Cross-posting here for visibility. 在此处交叉发布以提高可见性。

The problem was that PYTHONPATH included .../google-cloud-sdk/platform/google_appengine/ . 问题是PYTHONPATH包含.../google-cloud-sdk/platform/google_appengine/

Removing AppEngine from the PYTHONPATH resolved the problem. PYTHONPATH删除AppEngine解决了该问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM