首页 > 解决方案 > 在 PythonAnywhere 中安装 Firebase SDK

问题描述

我正在尝试在 PythonAnywhere 云服务中使用 firebase。我已经使用以下命令在 bash 控制台中安装了 firebase-python SDK:

mkvirtualenv --python=/usr/bin/python3.8 deploy 

接着

pip install firebase-python

我已经在 web 应用程序中添加了虚拟环境路径,并在 WSGI 配置文件中完成了所有设置。但是当我在我的web appusing 中导入 firebase SDK 时from firebase import firebase

我在控制台中收到错误消息 

ModuleNotFoundError: No module named 'firebase'

标签: pythonfirebasefirebase-realtime-databasepythonanywhere

解决方案


尝试: pip install firebase 或使用 firebase admin SDK: pip install firebase-admin 结束: import firebase-admin


推荐阅读