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

Installation via pip on Raspbian Strech failled #271

Closed
Sispheor opened this issue Sep 4, 2017 · 20 comments · Fixed by #304
Closed

Installation via pip on Raspbian Strech failled #271

Sispheor opened this issue Sep 4, 2017 · 20 comments · Fixed by #304

Comments

@Sispheor
Copy link

Sispheor commented Sep 4, 2017

Hi,

Here is my output during a sudo pip install snowboy on Raspbian Strech

sudo pip install snowboy
Collecting snowboy
  Using cached snowboy-1.2.0b1.tar.gz
Requirement already satisfied: PyAudio in /usr/local/lib/python2.7/dist-packages/PyAudio-0.2.11-py2.7-linux-armv7l.egg (from snowboy)
Building wheels for collected packages: snowboy
  Running setup.py bdist_wheel for snowboy ... error
  Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-4S_Hxf/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/tmp82jh2Opip-wheel- --python-tag cp27:
  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/rpi/libsnowboy-detect.a -L/usr/lib/python2.7/config-arm-linux-gnueabihf -L/usr/lib -lpython2.7 -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.linux-armv7l-2.7
  creating build/lib.linux-armv7l-2.7/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 /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-4S_Hxf/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-z5O3Qz-record/install-record.txt --single-version-externally-managed --compile:
    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/rpi/libsnowboy-detect.a -L/usr/lib/python2.7/config-arm-linux-gnueabihf -L/usr/lib -lpython2.7 -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.linux-armv7l-2.7
    creating build/lib.linux-armv7l-2.7/snowboy
    error: can't copy 'swig/Python/_snowboydetect.so': doesn't exist or not a regular file
    
    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-4S_Hxf/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-z5O3Qz-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-4S_Hxf/snowboy/
@chenguoguo
Copy link
Collaborator

Seems like it was looking at the wrong library. @leosampaio could you take a look?

@AMEvers
Copy link

AMEvers commented Sep 24, 2017

I'm having this exact same issue.

@timjong93
Copy link

Same issue, any progress?

@chenguoguo
Copy link
Collaborator

any luck? @leosampaio

@AMEvers
Copy link

AMEvers commented Oct 9, 2017

Nope. Still having issues both through Pip and Pycharm.


$ pip install snowboy
Collecting snowboy
  Downloading snowboy-1.2.0b1.tar.gz (5.0MB)
    100% |████████████████████████████████| 5.0MB 318kB/s 
Requirement already satisfied: PyAudio in /usr/local/lib/python2.7/dist-packages (from snowboy)
Building wheels for collected packages: snowboy
  Running setup.py bdist_wheel for snowboy ... error
  Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-7QDEr9/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/tmpwqOWpdpip-wheel- --python-tag cp27:
  running bdist_wheel
  running build
  Compiling snowboy...
  /bin/sh: 1: swig: not found
  expr: syntax error
  g++ -I../../ -O3 -fPIC -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++0x  -shared snowboy-detect-swig.o \
  ../..//lib/ubuntu64/libsnowboy-detect.a -L/usr/lib/python2.7/config-x86_64-linux-gnu -L/usr/lib -lpython2.7 -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.linux-x86_64-2.7
  creating build/lib.linux-x86_64-2.7/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 /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-7QDEr9/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-OaVVxB-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    Compiling snowboy...
    /bin/sh: 1: swig: not found
    expr: syntax error
    g++ -I../../ -O3 -fPIC -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++0x  -shared snowboy-detect-swig.o \
    ../..//lib/ubuntu64/libsnowboy-detect.a -L/usr/lib/python2.7/config-x86_64-linux-gnu -L/usr/lib -lpython2.7 -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.linux-x86_64-2.7
    creating build/lib.linux-x86_64-2.7/snowboy
    error: can't copy 'swig/Python/_snowboydetect.so': doesn't exist or not a regular file
    
    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-7QDEr9/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-OaVVxB-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-7QDEr9/snowboy/

@chenguoguo
Copy link
Collaborator

Looking at the first error, could you try to make sure you have swig (3.0.10 or above) on your path?

@causztic
Copy link

causztic commented Oct 11, 2017

I have upgraded my swig to 3.0.12 on python 3.6 and still the same issue. pip install works on python 2.7.13 though. Am on Mac OSX.

@chenguoguo
Copy link
Collaborator

Did you get the following error:

@chenguoguo
Copy link
Collaborator

@AMEvers were you using Python 2.7 or Python 3?

@nmctseb
Copy link
Contributor

nmctseb commented Oct 31, 2017

FYI, installing manually (python setup.py install) works fine for me. This in a Py3.5 venv. Only pip throws the error.

EDIT: Upon closer inspection, it didn't, but now it does: #304

@chenguoguo
Copy link
Collaborator

Merged #304

@Psychokiller1888
Copy link

Psychokiller1888 commented Feb 21, 2018

This still doesn't work as of now, using pip (python 2.7)

@chenguoguo
Copy link
Collaborator

Have you tried to use it in virtualenv? It's possible that something was messed up. Here are what I did on my osx

sudo pip install virtualenv
mkdir snowboy_test
cd snowboy_test
virtualenv venv
source venv/bin/active
pip install snowboy

and I was able to install it.

@Psychokiller1888
Copy link

I was able to install using setup.py, but problems with Swig, with atlas, and others ending with snowboy not being able to start because the snowboydetect file not being created pushed me away from snowboy and led me to Snips. This all happened on a fresh installed raspbian stretch ligh raspberry pi 3 mod B. I love the custom hotword generation on Snowboy though, hope I'll be able to try it working once!

//close

@chenguoguo
Copy link
Collaborator

OK watch this #383 @Psychokiller1888

@Psychokiller1888
Copy link

Thank you! I went around the problem by finding already compiled files that people share on their repos here and there.

@316JakeMorris
Copy link

316JakeMorris commented Jun 22, 2018

I still am not able to install snowboy by using sudo pip install snowboy. I am using a Raspberry Pi 3 running Raspbian Stretch. I have followed the docs on the website and installed the various things. I then made a directory /swig/Python in home and installed the binaries there and extracted them. From there I have run sudo pip install snowboy but I get the following error message.
https://pastebin.com/0FkMwAYb

@hongquan
Copy link

hongquan commented Jul 3, 2018

@chenguoguo Could you please publish the latest revision to PyPI, so that snowboy can be installed with pip3?

@chenguoguo
Copy link
Collaborator

@eqiihuu please take a look at this. i don't have the bandwidth to check the details now.

@Blboun3
Copy link

Blboun3 commented Nov 7, 2021

Still an issues...
I have newest version of arch linux and newest version of python (3.9.7)

pip3 install snowboy

Defaulting to user installation because normal site-packages is not writeable
Collecting snowboy
  Using cached snowboy-1.2.0b1.tar.gz (5.0 MB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: PyAudio in /home/cyril/.local/lib/python3.9/site-packages (from snowboy) (0.2.11)
Building wheels for collected packages: snowboy
  Building wheel for snowboy (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-fy3nx4gl/snowboy_d8a9ea01cf7f4746a68d32c284a29e9b/setup.py'"'"'; __file__='"'"'/tmp/pip-install-fy3nx4gl/snowboy_d8a9ea01cf7f4746a68d32c284a29e9b/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-z7w3nd4m
       cwd: /tmp/pip-install-fy3nx4gl/snowboy_d8a9ea01cf7f4746a68d32c284a29e9b/
  Complete output (12 lines):
  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  -L/usr/lib  -lcrypt -lpthread -ldl  -lutil -lm -lm  -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
  make: *** [Makefile:65: _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
  ----------------------------------------
  ERROR: 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
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-fy3nx4gl/snowboy_d8a9ea01cf7f4746a68d32c284a29e9b/setup.py'"'"'; __file__='"'"'/tmp/pip-install-fy3nx4gl/snowboy_d8a9ea01cf7f4746a68d32c284a29e9b/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-brvx7jgz/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/cyril/.local/include/python3.9/snowboy
         cwd: /tmp/pip-install-fy3nx4gl/snowboy_d8a9ea01cf7f4746a68d32c284a29e9b/
    Complete output (14 lines):
    running install
    /home/cyril/.local/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
      warnings.warn(
    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  -L/usr/lib  -lcrypt -lpthread -ldl  -lutil -lm -lm  -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
    make: *** [Makefile:65: _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
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-fy3nx4gl/snowboy_d8a9ea01cf7f4746a68d32c284a29e9b/setup.py'"'"'; __file__='"'"'/tmp/pip-install-fy3nx4gl/snowboy_d8a9ea01cf7f4746a68d32c284a29e9b/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-brvx7jgz/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/cyril/.local/include/python3.9/snowboy Check the logs for full command output.

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

Successfully merging a pull request may close this issue.

10 participants