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

Using RPIO with Python 3 (trying) #68

Closed
jctj opened this issue Jun 12, 2015 · 0 comments
Closed

Using RPIO with Python 3 (trying) #68

jctj opened this issue Jun 12, 2015 · 0 comments

Comments

@jctj
Copy link

jctj commented Jun 12, 2015

I get the following error message with my program:

pi@TestPi ~ $ sudo python3 "bread test.py"
Traceback (most recent call last):
File "bread test.py", line 7, in
import RPIO as GPIO
File "/usr/local/lib/python3.2/dist-packages/RPIO-0.10.0-py2.7-linux-armv6l.egg/RPIO/init.py", line 115, in
import RPIO._GPIO as _GPIO
ImportError: /usr/local/lib/python3.2/dist-packages/RPIO-0.10.0-py2.7-linux-armv6l.egg/RPIO/_GPIO.so: undefined symbol: _Py_ZeroStruct

When I installed RPIO, it only put the libraries in the python2.7 folder, so I copied the 2.7 libs directly into the python3.2 folder.

The same program runs fine (ignoring "print" formatting with the parenthesis) in python 2.7, but gets the above error in python 3.2

Also, when I try to run "rpio-curses" I get the following error:

pi@TestPi ~ $ rpio-curses
Script not started as root. Running sudo...
Traceback (most recent call last):
File "/usr/local/bin/rpio-curses", line 5, in
pkg_resources.run_script('RPIO==0.10.0', 'rpio-curses')
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 499, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1235, in run_script
execfile(script_filename, namespace, namespace)
File "/usr/local/lib/python2.7/dist-packages/RPIO-0.10.0-py2.7-linux-armv6l.egg/EGG-INFO/scripts/rpio-curses", line 93, in
"Maker: %s") % RPIO.sysinfo()
File "/usr/local/lib/python2.7/dist-packages/RPIO-0.10.0-py2.7-linux-armv6l.egg/RPIO/init.py", line 183, in sysinfo
return (RPI_REVISION_HEX,) + MODEL_DATA[RPI_REVISION_HEX.lstrip("0")]
KeyError: '10'

Please help - I would love to be able to use rpio-curses and use the library with python 3.2.

Thanks!
James

@jctj jctj closed this as completed Jun 12, 2015
@jctj jctj reopened this Jun 12, 2015
@jctj jctj closed this as completed Jun 17, 2015
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

1 participant