2

Hi I am trying to connect my python script to the google firebase. I have run into some issues with installing pyrebase. when i install using pip install pyrebase i get this error message:

image 1:

enter image description here

However i have tried several way to fix this, one way was by installing by pip install pyrebase4. The installation would go just fine, but when I would go to write the import statement import pyre base i would get this error:

Image 2:

enter image description here

I have also tried uninstalling pyrebase4 and installing setuptools and gcloud from which i should be able to pip install pyrebase. However it fails to build pycryptodome wheel. it then executes this error:

Image 3:

enter image description here

Could anyone please help me get this installed an running, i need to finish a project here soon, but this bottleneck is really stressing me out

Naresh
  • 16,698
  • 6
  • 112
  • 113
scubasteve7
  • 57
  • 2
  • 2
  • 5
  • You have a plethora of outdated packages; I would update them first, since that is where the root of the problem appears to be. – l'L'l Feb 23 '19 at 04:15
  • Where should I start looking for out of date packages? – scubasteve7 Feb 23 '19 at 04:24
  • If you want to update all outdated packages [this answer](https://stackoverflow.com/q/2720014/499581) should provide some hints. – l'L'l Feb 23 '19 at 04:26
  • well i updated gcloud oauth2client pycryptodome requests and requests-toolbelt with pip install --upgrade however when i try to pip install pyrebase it tells me I have failed to build the wheel for pycryptodome and presented with the error failed with error code 1 in C:\Users\xscub\AppData\Local\Temp\pip-install-svz5v77l\pycryptodome\ – scubasteve7 Feb 23 '19 at 04:32
  • 1
    Okay I am not exactly sure what i did after doing all of that i uninstalled pycrpyto dome pip installe --upgrade pycrpytodome then pip install pyrebase4 and now it seems to compile.. – scubasteve7 Feb 23 '19 at 04:36

3 Answers3

15

I faced the same issue with RSA crypto. Then I uninstall my pycrypto package and re install them, which works fine for me. Here are my commands for uninstalling and reinstalling;

  • pip uninstall PyCrypto
  • pip uninstall PyCryptodome
  • pip install PyCryptodome

Try them and see it.

Kumar Student
  • 239
  • 2
  • 6
  • 1
    Worked for me, happened when I installed `pycryptodome` when `pycrpyto` was already installed. The install should probably check if you have the old one installed – Jonno_FTW May 14 '20 at 07:19
1

The python3 -m pip install pyrebase4 command solved my problem on Mac OS Catalina.

But the problem you are having is related to not having the c/c++ dependencies installed. You will get the same error if you don't get c/c++ from visual studio. The command I wrote won't work without them.

cconsta1
  • 737
  • 1
  • 6
  • 20
0

Go into the file which the error is pointing to (pyrebase.py) and change the reference from (from Crypto import RSA) to (from Crypto import rsa).

That might do the trick although for the version I am using I had to go into the Crypto package and fix alot of other incorrect imports. Alot of the imports where referenced in capital letters when they should have been in lowercase.

If you do both of those you should be fine, it worked for me at least.

nate.py
  • 21
  • 2