6

I can't import correct Firebase package in Raspberry PI.

My code:
from firebase import firebase
db = firebase.FirebaseApplication("https://xyz.firebaseio.com/", None)

Error:
Traceback (most recent call last):
  File "datastorage.py", line 1, in <module>
    from firebase import firebase
firebase/__init__.py", line 14, in <module>
    import python_jwt as jwt
ModuleNotFoundError: No module named 'python_jwt'

I tried to use this commands and it didn't help:

sudo pip install requests
sudo pip install python-firebase
pip install jwt

I use Python 3.7.3 and Raspbian Buster. All works on my PC but not on RPi 3B+.

paul95
  • 379
  • 1
  • 2
  • 8

3 Answers3

21

I used advice from @naive.

pip install python_jwt

After that I solved another errors in that order:

pip install gcloud
pip install sseclient
pip install pycrypto
pip install requests-toolbelt

And now I see that It works. Problem was solved.

paul95
  • 379
  • 1
  • 2
  • 8
0

I think you need python_jwt instead of jwt. You can do:

pip install python_jwt

naive
  • 367
  • 1
  • 3
  • 9
0

If you're referring to this library: https://pyjwt.readthedocs.io/en/latest/

Then you need to install like this: pip install PyJWT

And afterwards this will work: import jwt

Joe Gasewicz
  • 1,252
  • 15
  • 20