Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

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

Open
waynejacobsen opened this issue Aug 11, 2016 · 17 comments
Open

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

waynejacobsen opened this issue Aug 11, 2016 · 17 comments

Comments

@waynejacobsen
Copy link

I would of thought this issue would have been resolved by now, but on a PI3 using install python2.7-dev, which solved my can't find python.h problem - thanks, I get this error. Help is needed please.

pi@raspberrypi:~/python $ sudo python PIstuffing.py
Traceback (most recent call last):
File "PIstuffing.py", line 3, in
from RPIO import PWM
File "build/bdist.linux-armv7l/egg/RPIO/init.py", line 115, in
File "build/bdist.linux-armv7l/egg/RPIO/GPIO.py", line 7, in
File "build/bdist.linux-armv7l/egg/RPIO/GPIO.py", line 6, in __bootstrap
SystemError: This module can only be run on a Raspberry Pi!

@joshuabaldwin
Copy link

I am running into the exact same issue, with my Pi 3. Has anyone found a solution to this?

@waynejacobsen
Copy link
Author

Pi 3 is a raspberry pi. Do you mean a particular modle?

Sent from Wayne's iPad

On Sep 9, 2016, at 6:58 PM, Joshua Baldwin [email protected] wrote:

I am running into the exact same issue, with my Pi 3. Has anyone found a solution to this?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@joshuabaldwin
Copy link

Wayne, the Raspberry Pi 3 gets the error message generated by line 533 of source/c_gpio/py_gpio.c

PyErr_SetString(PyExc_SystemError, "This module can only be run on a Raspberry Pi!");

I am running a Raspberry Pi 3 Model B. The hardware changes are such that I cannot figure out how to replicate Cor Cornelisse's 9/10/2014 commit, which was designed to add support for the RPi 2B, to add support for the RPi 3B.

(github.com/metachris/RPIO/commit/fadf602816accaeba3f54a85b9f35a8181ec076c)

@Yackou
Copy link

Yackou commented Sep 12, 2016

I have tried adding Pi3 support in my PR, in addition to Pi2 (for both GPIO and PWM). I have only validated on a Pi2 (don't have a Pi3), but I believe Pi3 support should be almost if not already working in my v2 branch.
Can you test it?
#82
or
https://github.com/Yackou/RPIO/tree/v2

@waynejacobsen
Copy link
Author

I would be happy to but, understand I'm old and slow. I could send you my pi3 on the basis that you will return it when finished. I'll pay round trip postage.

  From: Yackou <[email protected]>

To: metachris/RPIO [email protected]
Cc: waynejacobsen [email protected]; Author [email protected]
Sent: Monday, September 12, 2016 3:21 PM
Subject: Re: [metachris/RPIO] This module can only be run on a Raspberry Pi! (#86)

I have tried adding Pi3 support in my PR, in addition to Pi2 (for both GPIO and PWM). I have only validated on a Pi2 (don't have a Pi3), but I believe Pi3 support should be almost if not already working in my v2 branch.
Can you test it?
#82
or
https://github.com/Yackou/RPIO/tree/v2—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@joshuabaldwin
Copy link

joshuabaldwin commented Sep 12, 2016

Yackou, I'm trying to figure out how to clone your RPIO V2 on my Pi3 for testing. Attempting this:

git clone https://github.com/Yackou/RPIO/tree/v2/RPIO.git

is giving me a fatal repository not found error.

@waynejacobsen
Copy link
Author

Ill try v2 tomorrow on pi3

Sent from Wayne's iPad

On Sep 12, 2016, at 4:11 PM, Joshua Baldwin [email protected] wrote:

I'm trying to figure out how to clone your installation on my Pi3 for testing. Attempting this:

git clone https://github.com/Yackou/RPIO/tree/v2/RPIO.git

is giving me a fatal repository not found error.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@Yackou
Copy link

Yackou commented Sep 13, 2016

@joshuabaldwin:
The following commands should work:
git clone https://github.com/Yackou/RPIO.git
cd RPIO
git checkout v2

@surak
Copy link

surak commented Oct 26, 2016

  1. What about pip?
  2. Do we always need root for this?

@VSkublin
Copy link

VSkublin commented Apr 10, 2017

I have faced the same problem, this solution make it work:
First need to be sure that header files and static libraries for python dev. installed properly:
sudo apt-get install python-dev # for python2.x installs
sudo apt-get install python3-dev # for python3.x installs
Then try to install RPIO branch v2, it will work with RPI3.
cd ~
git clone https://github.com/metachris/RPIO.git --branch v2 --single-branch
cd RPIO
sudo python setup.py install

This helped me to install RPIO for several RPI3s.

@TafThorne
Copy link

This looks like a duplicate of #78

@JohnPeel
Copy link

JohnPeel commented Oct 13, 2017

RPi3 in 64bit mode doesn't work.

I assume because /proc/cpuinfo has slightly changed to not have any information on what board you're using.

rpi3 ~ # cat /proc/cpuinfo
processor       : 0
BogoMIPS        : 38.40
Features        : fp asimd evtstrm crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd03
CPU revision    : 4

processor       : 1
BogoMIPS        : 38.40
Features        : fp asimd evtstrm crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd03
CPU revision    : 4

processor       : 2
BogoMIPS        : 38.40
Features        : fp asimd evtstrm crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd03
CPU revision    : 4

processor       : 3
BogoMIPS        : 38.40
Features        : fp asimd evtstrm crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd03
CPU revision    : 4

rpi3 ~ #

@Jezorko
Copy link

Jezorko commented Dec 18, 2018

Neither @Yackou nor @VSkublin solution works for me.

Contents of /proc/cpuinfo on my Raspberry:

# cat /proc/cpuinfo
processor       : 0
BogoMIPS        : 38.40
Features        : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd03
CPU revision    : 4

processor       : 1
BogoMIPS        : 38.40
Features        : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd03
CPU revision    : 4

processor       : 2
BogoMIPS        : 38.40
Features        : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd03
CPU revision    : 4

processor       : 3
BogoMIPS        : 38.40
Features        : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd03
CPU revision    : 4

I'm running Arch Linux ARM:

# uname -srvmo
Linux 4.16.0-1-ARCH #1 SMP Mon Apr 2 18:40:18 MDT 2018 aarch64 GNU/Linux

@ebarreraz
Copy link

I had the same problem with Ubuntu arm. With raspbian everything works perfectly

@blitzcaster
Copy link

Still no solution for Ubuntu 18.04 aarch64?

@minamagdyshehata
Copy link

minamagdyshehata commented Jun 29, 2019

I am facing this same problem on RPi3
why can't we update /proc/cpuinfo and add the missing line ?!!

EDITED :)

Hi everyone, My issue is solved and now i can use RPi.GPIO on my RPi 3 B+ with kali 64-bit.

Copy /proc/cpuinfo using this command:

sudo cp /proc/cpuinfo /root/cpuinfo_fake

Use nano to edit the cpuinfo_fake and add the missing line (Hardware,Revision and serial number)

nano /root/cpuinfo_fake

and those are the lines i added :

Hardware : BCM2837
Revision : a02082
Serial : 0000000000000000

then save the file.

now use this command to mount the cpuinfo_fake

sudo mount --bind /root/cpuinfo_fake /proc/cpuinfo

now check that it worked using:

cat /proc/cpuinfo

u can unmout the fake file using this command:

sudo umount /proc/cpuinfo

and ofcourse everytime u reboot ur RPi the cpuinfo file will go back to normal>

now to use this with a python script u will need those 2 lines in the beginning of ur script then proceed normally with the rest of the code:

import os
os.system("sudo mount --bind /root/cpuinfo_fake /proc/cpuinfo")

this whole method is explained here :
https://www.reddit.com/r/Crostini/comments/9g6e6y/matlab_issues_with_crostini_any_ideas/e69p8a5/

@DevXXM
Copy link

DevXXM commented Jul 6, 2019

我在RPi3上遇到同样的问题
为什么我们不能更新/ proc / cpuinfo并添加缺失的行?!!

编辑:)

大家好,我的问题已经_解决了_,现在我可以在我的RPi 3 B +上使用RPi.GPIO和kali 64位。

使用以下命令复制/ proc / cpuinfo:

sudo cp / proc / cpuinfo / root / cpuinfo_fake

使用nano编辑cpuinfo_fake并添加缺失的行(硬件,修订版和序列号)

nano / root / cpuinfo_fake

这些是我添加的行:

硬件:BCM2837
修订:a02082
序列号:0000000000000000

然后保存文件。

现在使用此命令挂载cpuinfo_fake

sudo mount --bind / root / cpuinfo_fake / proc / cpuinfo

现在检查它是否有效:

cat / proc / cpuinfo

你可以使用这个命令取消伪造的文件:

sudo umount / proc / cpuinfo

每次你重新启动你的RPi cpuinfo文件将恢复正常>

现在要使用python脚本,你将需要在你的脚本开头的那两行,然后正常使用其余的代码:

import os
os.system(“sudo mount --bind / root / cpuinfo_fake / proc / cpuinfo”)

这整个方法在这里解释:https
//www.reddit.com/r/Crostini/comments/9g6e6y/matlab_issues_with_crostini_any_ideas/e69p8a5/

thank you !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests