This module can only be run on a Raspberry Pi

Hello

trying to work with the guide and installing the Python GPIO I get this error:

root@bpi-iot-ros-ai:/home/pi/RPi.GPIO_BP/test# python led.py Traceback (most recent call last): File “led.py”, line 2, in import RPi.GPIO as GPIO File “/usr/lib/python2.7/dist-packages/RPi/GPIO/init.py”, line 23, in from RPi._GPIO import * RuntimeError: This module can only be run on a Raspberry Pi!

I am working with the standard Ubuntu 16.04 from the BPI-P2 Zero page. And the install guide that I was using: - http://wiki.banana-pi.org/Getting_Started_with_P2-Zero

image

there is no bpi_test_g40.py there is g40.py and this gives:

root@bpi-iot-ros-ai:/usr/local/bin# python g40.py Traceback (most recent call last): File “g40.py”, line 2, in import RPi.GPIO as GPIO File “/usr/lib/python2.7/dist-packages/RPi/GPIO/init.py”, line 23, in from RPi._GPIO import * RuntimeError: This module can only be run on a Raspberry Pi!

What can be done? Didnt find much info in the internet.

Hi @shaddow501,

It’s been months since you post your question, and yet no one answer.
You might get it done already.
For someone who still struggling to make RPi.GPIO working on P2Z here’s what I have tried: Download and compiled from here

(env0) [alarm@alarm test]$ pwd
/home/alarm/source/RPi.GPIO_BP/test
(env0) [alarm@alarm test]$ python info_RPi.GPIO.py 
BPi VERSION:		
1
RPi.GPIO VERSION:	
0.5.8
(env0) [alarm@alarm test]$ python -V
Python 3.7.4
(env0) [alarm@alarm test]$ 

Dear xqdzn

I have overcome this issue a long time ago but I do not remember what I did, anyway it was for a work project that currently running with no issue.

I also have an issue with this. I have installed WiringPi and RPi.GPIO from Sinovoip’s github. WiringPi works, but I get the following when I run the test script.

(oprint) pi@OctoPrint:~/oprint/lib/python2.7/site-packages/RPi.GPIO/test$ sudo ./g40.py
[sudo] password for pi: 
BPI: gpioLayout(21)
BPI: name[bpi-m1] gpioLayout(21)
Pi Board Information
---------------------
P1_REVISION => 3
RAM => 1024MB
REVISION => 4001
TYPE => Banana Pi M1[A20]
PROCESSOR => Allwinner
MANUFACTURER => BPI-Sinovoip

Is this board info correct (y/n) ? y
8 GPIO.setup GPIO.OUT
enter to sunxi_setup
sunxi_gpio_function
sunxi_setup_gpio
sunxi_set_pullupdn
Segmentation fault

Any clues? What kernel did you use that worked?

Hello

The most image that worked for me (with Kernel Update) is: Ubuntu Bionic with Armbian Linux 5.1.15-sunxi64

I use Arch linux with 5.2.8 Kernel:

Linux p2z 5.2.8-1-ARCH #1 SMP PREEMPT Fri Aug 9 23:29:40 UTC 2019 armv7l GNU/Linux

Linux bananapim64 5.1.15-sunxi64 #5.90 SMP Fri Jul 5 01:44:56 IDT 2019 aarch64 aarch64 aarch64 GNU/Linux

Sorry I was answering about other module that I have, I use:

Linux bpi-iot-ros-ai 3.4.113-BPI-M2Z-Kernel #1 SMP PREEMPT Mon Aug 13 14:48:42 CST 2018 armv7l armv7l armv7l GNU/Linux I didnt recover from this problem:

root@bpi-iot-ros-ai:~/RPi.GPIO/test# python g40.py Traceback (most recent call last): File “g40.py”, line 2, in import RPi.GPIO as GPIO File “/usr/lib/python2.7/dist-packages/RPi/GPIO/init.py”, line 23, in from RPi._GPIO import * RuntimeError: This module can only be run on a Raspberry Pi!

Try to use this one, I think this works

The support from bananaPI team is the bad… they create modules but forget to get them working… what can we do with a hardware that cannot work??