I have a couple of firebase python files, one that writes to my database fine, and one that retrieves data from my firebase database no problem. They are both written in Python 3.5.3. I have a flask website that I am developing, as soon as I use the
import firebase_admin
in MyFlaskApp.py it throws up the error no module named firebase_admin and I get the following error.
flask.cli.NoAppException: While importing "TrialPage", an ImportError was
raised:
Traceback (most recent call last):
File "/home/pi/Documents/WebFlask/venv/lib/python3.5/site-
packages/flask/cli.py", line 236, in locate_app
__import__(module_name)
File "/home/pi/Documents/WebFlask/TrialPage.py", line 1, in <module>
from firebase_admin import firebase_admin
ImportError: No module named 'firebase_admin'
my other files work completely fine, I can understand why this wont work with my flask file. I have even tried creating a brand new MyFlaskApp.py file just incase something was corrupt with the existing file I am using. This did not work.
This error is thrown up regardless of whether the import firebase_admin is at the very top of my file or underneath my other imports, or in the middle of a function.