Closed pabangan closed 6 years ago
You have to compile under swig/Python or swig/Python3. See the documentations.
How did you make this work?
I followed the docs and did:
cd swig/Python3
make
this generated snowboydetect.py
and _snowboydetect.so
Then ran python3 ~/snowboy/examples/Python3/demo.py ~/snowboy_voice_models/jarvis.umdl
and I get:
Traceback (most recent call last):
File "/home/pi/snowboy/examples/Python3/demo.py", line 1, in <module>
import snowboydecoder
File "/home/pi/snowboy/examples/Python3/snowboydecoder.py", line 5, in <module>
from . import snowboydetect
SystemError: Parent module '' not loaded, cannot perform relative import
Can someone please help with this error. I have no previous experience with python nor RPi3. I got this error trying to run the demo and from previous issues, seems to be because it doesn't support python3. I've searched a lot, and haven't been able to find a working solution to downgrading to python2.7. Could be another cause, I just don't know.
Traceback (most recent call last): File "demo.py", line 1, in
import snowboydecoder
File "/home/pi/rpi-arm-raspbian-8.0-1.1.1/snowboydecoder.py", line 5, in
import snowboydetect
File "/home/pi/rpi-arm-raspbian-8.0-1.1.1/snowboydetect.py", line 28, in
_snowboydetect = swig_import_helper()
File "/home/pi/rpi-arm-raspbian-8.0-1.1.1/snowboydetect.py", line 24, in swig_import_helper
_mod = imp.load_module('_snowboydetect', fp, pathname, description)
File "/usr/lib/python3.5/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/usr/lib/python3.5/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: dynamic module does not define module export function (PyInit__snowboydetect)