pythonmodulepycharmpyrebase

ModuleNotFoundError: No module named 'pyasn1'


File "D:\Documents\my_project\firebase_login.py", line 1, in <module>
     from pyrebase import pyrebase
   File "D:\Documents\Python_projects\Test_kivy\venv\lib\site-packages\pyrebase\__init__.py", line 1, in <module>
     from .pyrebase import initialize_app
   File "D:\Documents\Python_projects\Test_kivy\venv\lib\site-packages\pyrebase\pyrebase.py", line 17, in <module>
     from oauth2client.service_account import ServiceAccountCredentials
   File "D:\Documents\Python_projects\Test_kivy\venv\lib\site-packages\oauth2client\service_account.py", line 26, in <module>
     from oauth2client import crypt
   File "D:\Documents\Python_projects\Test_kivy\venv\lib\site-packages\oauth2client\crypt.py", line 23, in <module>
     from oauth2client import _pure_python_crypt
   File "D:\Documents\Python_projects\Test_kivy\venv\lib\site-packages\oauth2client\_pure_python_crypt.py", line 22, in <module>
     from pyasn1.codec.der import decoder
 ModuleNotFoundError: No module named 'pyasn1'

Process finished with exit code 1

My code was working like a charm yesterday, today I'm not able to launch it due to pyrebase crashing. I have this error coming from a PyCharm project.

Pyrebase4: v4.5.0 https://github.com/nhorvath/Pyrebase4


Solution

  • python -m ensurepip

    python get-pip.py

    pip install awscli --ignore-installed six

    ModuleNotFoundError: No module named 'pyasn1_modules'

    pip install pyasn1_modules

    ModuleNotFoundError: No module named 'google.protobuf'

    pip install protobuf