Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: No module named _snowboydetect #41

Closed
WarlaxZ opened this issue Aug 22, 2016 · 20 comments
Closed

ImportError: No module named _snowboydetect #41

WarlaxZ opened this issue Aug 22, 2016 · 20 comments

Comments

@WarlaxZ
Copy link

WarlaxZ commented Aug 22, 2016

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
Copy link
Collaborator

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
Copy link
Author

WarlaxZ commented Aug 22, 2016

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
Copy link
Collaborator

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
Copy link

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
Copy link
Collaborator

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

@Corkskru
Copy link

Corkskru commented Aug 25, 2016

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

@jurschreuder
Copy link

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
Copy link
Collaborator

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
#41 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/ALPfk1SCTEdVjidmFKvxoKFRXPfUAKW1ks5qlsLigaJpZM4JplGw
.

@Sispheor
Copy link

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
Copy link
Collaborator

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

@Sispheor
Copy link

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

@chenguoguo
Copy link
Collaborator

chenguoguo commented Sep 13, 2016

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
Copy link
Collaborator

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

@loukaskom
Copy link

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
Copy link
Collaborator

chenguoguo commented Nov 29, 2016 via email

@Nathanha
Copy link

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
Copy link

Sispheor commented Mar 18, 2017 via email

@mu3
Copy link

mu3 commented Jun 12, 2017

Same here on macOS 10.12.5

@Sean-Amor
Copy link

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
Copy link

SilaLiu commented Oct 31, 2024

ubuntu 22.04编译不通过

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

No branches or pull requests

10 participants