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.08k stars 999 forks source link

Can not install snowboy (Failed to build) #554

Open fritzroy opened 5 years ago

fritzroy commented 5 years ago

Hi All,

I have an issue with trying to install snowboy in a virturalenv using pip. I'm hoping someone can suggest what might be going wrong here and the corrective action I should take.

A description of the environment; VirturalBox running Raspbian stretch on x86

SWIG Version 4.0.0 Compiled with g++ [i686-pc-linux-gnu] Configured options: +pcre

pip 19.0.3 from /home/pi/proj/env/lib/python3.5/site-packages/pip (python 3.5)

Installing snowboy within the virturalenv

(env) pi@raspberry:~/proj $ pip install snowboy Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting snowboy Using cached https://files.pythonhosted.org/packages/86/fc/3a13408cb3b32abff1b0539f44fca02ca378d9077b11f0c95674f278f3de/snowboy-1.2.0b1.tar.gz Requirement already satisfied: PyAudio in ./env/lib/python3.5/site-packages (from snowboy) (0.2.11) Building wheels for collected packages: snowboy Building wheel for snowboy (setup.py) ... error Complete output from command /home/pi/proj/env/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-install-izftoegd/snowboy/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d /tmp/pip-wheel-ih3elmdj --python-tag cp35: running bdist_wheel running build Compiling snowboy... g++ -I../../ -O3 -fPIC -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++0x -shared snowboy-detect-swig.o \ ../..//lib/ubuntu64/libsnowboy-detect.a -lpython3.5m -lpthread -ldl -lutil -lm -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions -lm -ldl -lf77blas -lcblas -llapack_atlas -latlas -o _snowboydetect.so snowboy-detect-swig.o: file not recognized: File format not recognized collect2: error: ld returned 1 exit status Makefile:65: recipe for target '_snowboydetect.so' failed make: *** [_snowboydetect.so] Error 1 creating build creating build/lib creating build/lib/snowboy error: can't copy 'swig/Python/_snowboydetect.so': doesn't exist or not a regular file


Failed building wheel for snowboy Running setup.py clean for snowboy Failed to build snowboy Installing collected packages: snowboy Running setup.py install for snowboy ... error Complete output from command /home/pi/proj/env/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-install-izftoegd/snowboy/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-m7cr9iok/install-record.txt --single-version-externally-managed --compile --install-headers /home/pi/proj/env/include/site/python3.5/snowboy: running install running build Compiling snowboy... g++ -I../../ -O3 -fPIC -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++0x -shared snowboy-detect-swig.o \ ../..//lib/ubuntu64/libsnowboy-detect.a -lpython3.5m -lpthread -ldl -lutil -lm -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions -lm -ldl -lf77blas -lcblas -llapack_atlas -latlas -o _snowboydetect.so snowboy-detect-swig.o: file not recognized: File format not recognized collect2: error: ld returned 1 exit status Makefile:65: recipe for target '_snowboydetect.so' failed make: *** [_snowboydetect.so] Error 1 creating build creating build/lib creating build/lib/snowboy error: can't copy 'swig/Python/_snowboydetect.so': doesn't exist or not a regular file

----------------------------------------

Command "/home/pi/proj/env/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-install-izftoegd/snowboy/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-m7cr9iok/install-record.txt --single-version-externally-managed --compile --install-headers /home/pi/proj/env/include/site/python3.5/snowboy" failed with error code 1 in /tmp/pip-install-izftoegd/snowboy/

Thanks for your time.

fritzroy commented 5 years ago

Hum, OK looks like it may be picking up the wrong static lib?
g++ -I../../ -O3 -fPIC -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++0x -shared snowboy-detect-swig.o ../..//lib/ubuntu64/libsnowboy-detect.a

This is a 32 bit OS

fritzroy commented 5 years ago

OK, I think I found my answer, just paid attention to the README

Currently Snowboy supports (look into the lib folder):

all versions of Raspberry Pi (with Raspbian based on Debian Jessie 8.0) 64bit Mac OS X 64bit Ubuntu 14.04 iOS Android ARM64 (aarch64, Ubuntu 16.04)

Any chance there is a 32 bit version of the static lib?