TuryRx / Banana-pi-m2-zero-GPIO

gpio pin configuration and use project on Bananapi m2 zero board
38 stars 8 forks source link

This module can only be run on a Raspberry Pi! #8

Open SatsCzar opened 1 year ago

SatsCzar commented 1 year ago

I get this error:

pi@bananapim2zero:~/Banana-pi-m2-zero-GPIO/Bananapi-m2-zero-GPIO-files$ python3 info_gpio_m2z.py
Traceback (most recent call last):
  File "/home/pi/Banana-pi-m2-zero-GPIO/Bananapi-m2-zero-GPIO-files/info_gpio_m2z.py", line 4, in <module>
    import RPi.GPIO as GPIO
  File "/usr/local/lib/python3.9/dist-packages/RPi/GPIO/__init__.py", line 23, in <module>
    from RPi._GPIO import *
RuntimeError: This module can only be run on a Raspberry Pi!
pancanet commented 1 year ago

i have same problem at first, but i saw that unrar is not installed, there is a problem with sh file installer. libsdl-dev and python-dev is no longer available to install, it make other package not installed well, i change it to libsdl1.2-dev libsdl2-dev and python2-dev. and voila, its work. and there is something missing in sh file. the part that we need to change /var/lib/bananapi/board.sh from board-m3 to board-m2z. maybe it can help you

TuryRx commented 1 year ago

Hello friends, I'm telling you that what happens is that this configuration is only for the banana pi M2 Zero, if you try to run it on another board it will give you that error. It is also only executable on bace Ubuntu systems, anyway, anything remains to your questions.

TuryRx commented 1 year ago

tengo el mismo problema al principio, pero vi que unrar no está instalado, hay un problema con el instalador de archivos sh. libsdl-dev y python-dev ya no están disponibles para instalar, hace que otro paquete no esté bien instalado, lo cambio a libsdl1.2-dev libsdl2-dev y python2-dev. y listo, su trabajo. y falta algo en el archivo sh. la parte que necesitamos cambiar /var/lib/bananapi/board.sh de board-m3 a board-m2z. Puede que esto te ayude

Regarding this, I tell you that in the script if the board change is found, it executes it at the end of the script

SatsCzar commented 1 year ago

I'll try to tweak my Banana Pi soon, install some packages, run some tests, and so on.

evandene commented 1 year ago

I did try to install it on the latest TuryRx image on a Bananapi M2 Zero and it simple doesn't work. I followed the instructions step by step but encountered permission failures, pip3 failures, /home/pi not recognized, etc etc. gpio readall gives the below error: pi@clearview:~$ gpio readall Unable to determine hardware version. I see: Hardware : Allwinner sun8i Family ,

TuryRx commented 1 year ago

hello friend good night

Too bad that the instructions have not worked for you but I think I know why and if I would recommend you read everything in more detail because that error that you share with me is due to two causes that I have come across.

The first, the most recurring, is that they use debian images that are not compatible with my script or with the instructions.

the second is that they do not read the instructions in detail and some step can be omitted.

but don't worry soon I will update everything from the repository like the images for now I say goodbye and have a good night.