python - 在 PythonAnywhere 中安装 Firebase SDK
问题描述
我正在尝试在 PythonAnywhere 云服务中使用 firebase。我已经使用以下命令在 bash 控制台中安装了 firebase-python SDK:
mkvirtualenv --python=/usr/bin/python3.8 deploy
接着
pip install firebase-python
我已经在 web 应用程序中添加了虚拟环境路径,并在 WSGI 配置文件中完成了所有设置。但是当我在我的web app
using 中导入 firebase SDK 时from firebase import firebase
:
我在控制台中收到错误消息
ModuleNotFoundError: No module named 'firebase'
解决方案
尝试:
pip install firebase
或使用 firebase admin SDK:
pip install firebase-admin
结束:
import firebase-admin
推荐阅读
- python - 为什么 pyarrow `from_pandas` 无限期挂起?
- java - 分屏,移动大小应用时重新启动活动
- python-3.x - 打包时出错。使用 pyinstaller
- python - 使用 Flask 运行 Scrapy - 最终结果中出现未处理的错误
- scala - 错误'('预期但在Scala中找到标识符
- arrays - 在 C 编程中 - 如何用非数字输入打破 for 循环
- python - 如何通过在 python 中使用循环从 csv 文件的特定行中找到平均值?
- java - 使用 Jackson XML 获取 xmlns 值?
- reactjs - monaco-editor/react onClick 事件不会触发
- python - 如何使用 pytest-bdd 实现 pytest xfail 标记?