I'm trying to use the rPi SPI (read from RFID-RC522) port using this repo.

When I'm trying to run test-nRF.py on a Raspberry Pi, I'm getting the following error:

 pi@raspberrypi ~/SPI-Py $ python test-nRF.py install Traceback (most
 recent call last):   File "test-nRF.py", line 11, in <module>
     status = spi.openSPI(speed=1000000) AttributeError: 'module' object has no attribute 'openSPI'

I installed the MFRC522-python library and the SPI-Py also but I got the same error.

How can I fix this error?


I ran into the same Problem... You got to use virtual-env (recommended by community).

Did you import SPI in your script?


Reinstalling all the dependencies inlcuding the SPI Module in an active virtual-environment did the trick for me.

The Doc´s: Virtualenv.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.