Kitt-AI / snowboy

Future versions with model training module will be maintained through a forked version here: https://github.com/seasalt-ai/snowboy
Other
3.1k stars 1k forks source link

ImportError: No module named _snowboydetect #41

Closed WarlaxZ closed 8 years ago

WarlaxZ commented 8 years ago

Hi Guys,

First of all, absolutely love the library, using it for a smart home and it's literally the way I get everything to work. I actually run this on a pi 3 which is the interface to all the cool stuff. However I develop on windows (mounted samba from the pi), but unfortunately, I can't test locally first and I have to keep running on the pi and its a bit of a pain. Is there any likelihood that you guys will get it running on windows?

Really so much love for all you've done though, keep up the great work! :D

chenguoguo commented 8 years ago

Thanks a lot for the support! It's always good to hear back from users that the project is actually doing them something good :-)

Unfortunately we don't have a near-term plan for porting this on to Windows. Windows 10 now has the native bash shell terminal. Will that be helpful for your testing?

WarlaxZ commented 8 years ago

I'll be honest I don't even know what that is? Will that enable me to import the .so file in python? If so and you can tell me how that would be fantastic! For now I'm having to restort to using raw_input and bypassing snowboy, and thats just a shame as I full on love this project. Literally adding new features to my home automation every day :) Just today added the ability to play a film or tv show by name within kodi, and yesterday added the ability to play spotify via mopidy by genre/artist/generic search. Literally having so much fun making everything run so smoothly!

Just thought I'd list some of the cool things I've been enabled to do recently just because of your project, to let you guys know what a great job you've done and some examples of the tools you have enabled! :D

chenguoguo commented 8 years ago

Sounds like a lot of great things are going on in your home :-) Would you like making some videos/demos to show off your project to others? We have a blog that keeps track of the interesting projects developed with Snowboy from developers. We can put your project there as well. See here: https://blog.kitt.ai/2016/08/16/snowboy-has-more-than-1-000-developer-users/

For the bash shell terminal on Windows 10, more details can be found here. It's basically a Linux terminal on Windows systems that can run whatever program that runs on Linux, so it should be able to run Snowboy from Windows as well. But I'm not sure how easy it will be when you integrate this with your existing project on Windows. I haven't tried this by myself, and I haven't developed on Windows machines for a long long time :-(

Corkskru commented 8 years ago

I am facing similar issue of ImportError: No module named _snowboydetect. I have followed exactly the same procedure mentioned in the documentation. I am using python 2.7.5 and swig 3.0.10 Any help in this case will be appreciated!

chenguoguo commented 8 years ago

Please tell us more details, e.g., what is your platform, what is the os, etc.

Corkskru commented 8 years ago

I am on Ubuntu 14.04 - just trying to compile and run the Python wrapper. Thanks

jurschreuder commented 8 years ago

Hi I've also got problems with Swig and Python. Hope this info is helpful.

Ubuntu 15.10 swig 3.0.7 - built from source as recommended in snowboy/swig/Python/Makefile Both python2.7 and python3.5 got this issue.

$ ~/src/github.com/Kitt-AI/snowboy/swig/Python$ python

Python 2.7.10 (default, Oct 14 2015, 16:09:02) 
[GCC 5.2.1 20151010] on linux2

>>> import snowboydetect.py
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "snowboydetect.py", line 28, in <module>
    _snowboydetect = swig_import_helper()
  File "snowboydetect.py", line 24, in swig_import_helper
    _mod = imp.load_module('_snowboydetect', fp, pathname, description)
ImportError: ./_snowboydetect.so: undefined symbol: _ZNK7snowboy13SnowboyDetect14GetSensitivityB5cxx11Ev
chenguoguo commented 8 years ago

We don't have a binary for Ubuntu 15.10. Could you try 14.04?

Guoguo

On Thu, Sep 1, 2016 at 5:19 AM, jurschreuder notifications@github.com wrote:

Hi I've also got problems with Swig and Python. Hope this info is helpful.

Ubuntu 15.10 swig 3.0.7 - built from source as recommended in snowboy/swig/Python/Makefile Both python2.7 and python3.5 got this issue.

$ ~/src/github.com/Kitt-AI/snowboy/swig/Python$ python

Python 2.7.10 (default, Oct 14 2015, 16:09:02) [GCC 5.2.1 20151010] on linux2

import snowboydetect.py Traceback (most recent call last): File "", line 1, in File "snowboydetect.py", line 28, in _snowboydetect = swig_import_helper() File "snowboydetect.py", line 24, in swig_import_helper _mod = imp.load_module('_snowboydetect', fp, pathname, description) ImportError: ./_snowboydetect.so: undefined symbol: _ZNK7snowboy13SnowboyDetect14GetSensitivityB5cxx11Ev

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Kitt-AI/snowboy/issues/41#issuecomment-244061528, or mute the thread https://github.com/notifications/unsubscribe-auth/ALPfk1SCTEdVjidmFKvxoKFRXPfUAKW1ks5qlsLigaJpZM4JplGw .

Sispheor commented 8 years ago

Same for me on Ubuntu 16.04

cd Documents/snowboy/swig/Python/
nico@ubuntu:[~/Documents/snowboy/swig/Python]: ls
Makefile  snowboydetect.py  _snowboydetect.so  snowboy-detect-swig.cc  snowboy-detect-swig.i  snowboy-detect-swig.o
nico@ubuntu:[~/Documents/snowboy/swig/Python]: python
Python 2.7.12 (default, Jul  1 2016, 15:12:24) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import snowboydetect.py
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "snowboydetect.py", line 28, in <module>
    _snowboydetect = swig_import_helper()
  File "snowboydetect.py", line 24, in swig_import_helper
    _mod = imp.load_module('_snowboydetect', fp, pathname, description)
ImportError: ./_snowboydetect.so: undefined symbol: _ZNK7snowboy13SnowboyDetect14GetSensitivityB5cxx11Ev
chenguoguo commented 8 years ago

Please try Ubuntu 14.04 for now... We compiled it for Ubuntu 14.04

Sispheor commented 8 years ago

It works on Ubuntu 16.04 with the compiled file from the tarball you provide for 14.04.

chenguoguo commented 8 years ago

OK @Sispheor @jurschreuder, I took a look and it appeared to be a g++ version problem. The Snowboy library was compiled with g++ 4.x, which mostly likely you guys have g++ 5.x on your system. The workaround is to add -D_GLIBCXX_USE_CXX11_ABI=0 to your CXXFLAGS in your Makefile. Let me know if this works.

To add a bit more of explanation (just for the record): Start from g++ 5.1, g++ added a new ABI for std::string and std::list. For back compatibility purpose, by default g++ will compile both the old ABI and the new ABI. This is much like the "fat-library" in iOS. Setting -D_GLIBCXX_USE_CXX11_ABI=0 basically turns off the new ABI.

chenguoguo commented 8 years ago

I'm assuming the issue has been resolved, so closing.

loukaskom commented 7 years ago

Is the library supposed to work on Debian8? I am trying to run the demo.py and i am getting this error. Traceback (most recent call last): File "demo.py", line 1, in import snowboydecoder File "/home/loukas/snowboy-master/examples/Python/snowboydecoder.py", line 5, in import snowboydetect ImportError: No module named snowboydetect

chenguoguo commented 7 years ago

We did not compile the library on Debian, but most likely the Ubuntu 14.04 version will work. Have you tried the pre-compiled version here:

https://s3-us-west-2.amazonaws.com/snowboy/snowboy-releases/ubuntu1404-x86_64-1.1.0.tar.bz2

On Tue, Nov 29, 2016 at 8:39 AM, loukaskom notifications@github.com wrote:

Is the library supposed to work on Debian8? I am trying to run the demo.py and i am getting this error. Traceback (most recent call last): File "demo.py", line 1, in import snowboydecoder File "/home/loukas/snowboy-master/examples/Python/snowboydecoder.py", line 5, in import snowboydetect ImportError: No module named snowboydetect

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/Kitt-AI/snowboy/issues/41#issuecomment-263624052, or mute the thread https://github.com/notifications/unsubscribe-auth/ALPfkxKqb6sDd-ileo2AZCHpUS8UoLzuks5rDFVQgaJpZM4JplGw .

Nathanha commented 7 years ago

Hello, I get the error "ImportError: No module named _snowboydetect" on "kalliope start" command. I am on Ubuntu 14.04 LTS with a g++ 4.8, Swig 2.0.11 and python 2.7.6. My processor is an Intel Atom D510. Can you help me?

Sispheor commented 7 years ago

This is a kalliope issue and not snowboy. We only support x86_64 and arm7 processor currently.

Le 18 mars 2017 7:53 PM, "Nathanha" notifications@github.com a écrit :

Hello, I get the error "ImportError: No module named _snowboydetect" on "kalliope start" command. I am on Ubuntu 14.04 LTS with a g++ 4.8, Swig 2.0.11 and python 2.7.6. My processor is an Intel Atom D510. Can you help me?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Kitt-AI/snowboy/issues/41#issuecomment-287566718, or mute the thread https://github.com/notifications/unsubscribe-auth/ACdEXQsqmp673plMcyiwsCaywyCpHEHvks5rnCgTgaJpZM4JplGw .

mu3 commented 7 years ago

Same here on macOS 10.12.5

Sean-Amor commented 5 years ago

Can someone, anyone, make an updated video tutorial, or step by step typed out detail tutorial on getting set up on python 3, raspian stretch, rpi zero w. Not one video, or document online is the same, I can't get any to work.

SilaLiu commented 1 week ago

ubuntu 22.04编译不通过