ImportError: dynamic module does not define init function (PyInit__snowboydetect)
wupanhao opened this issue · 8 comments
(env) pi@raspberrypi:~/google-assistant-hotword-raspi $ python gassistant.py models/ok_google.pmdl
I run on my raspberry pi 2 , but get this error
(env) pi@raspberrypi:~/google-assistant-hotword-raspi $ python gassistant.py models/ok_google.pmdl
Traceback (most recent call last):
File "/home/pi/google-assistant-hotword-raspi/snowboydetect.py", line 18, in swig_import_helper
return importlib.import_module(mname)
File "/usr/lib/python3.4/importlib/__init__.py", line 109, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 1191, in _load_unlocked
File "<frozen importlib._bootstrap>", line 1161, in _load_backward_compatible
File "<frozen importlib._bootstrap>", line 539, in _check_name_wrapper
File "<frozen importlib._bootstrap>", line 1715, in load_module
File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
ImportError: dynamic module does not define init function (PyInit__snowboydetect)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "gassistant.py", line 1, in <module>
import snowboydecoder
File "/home/pi/google-assistant-hotword-raspi/snowboydecoder.py", line 5, in <module>
import snowboydetect
File "/home/pi/google-assistant-hotword-raspi/snowboydetect.py", line 21, in <module>
_snowboydetect = swig_import_helper()
File "/home/pi/google-assistant-hotword-raspi/snowboydetect.py", line 20, in swig_import_helper
return importlib.import_module('_snowboydetect')
File "/usr/lib/python3.4/importlib/__init__.py", line 109, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: dynamic module does not define init function (PyInit__snowboydetect)
Same problem here on Rri 3
The snowboy.so
in this repo is for Python 2.x only.
Same problem here, any solution for this error? I'm using Raspberry Pi 3, with virtual environment for Python 3
sad! I have the same problem...
python3 , raspberry pi3
I don't quite understand this.
The guide in the readme clearly shows the way to create python virtual envs for both python 2.7 and 3.
And shows how to rename the _snowboydetect.so, but the the final script to run, doesn't support python 3? That's a bit odd :(
@Moulde Since the last commit python 3 is supported. This issue was created before the python 3 support.
@warchildmd I think this issue should be marked as solved. As is causing some confusion.
Ah yes suddenly it worked :) Thanks Shaxine