0

Wit.ai is https://wit.ai/getting-started

The installation instruction is as follows: https://wit.ai/docs/python/1.0.0/quickstart

But i couldn't install it sucessfully, I've tried:

alvas@ubi:~$ sudo -H pip install wit
[sudo] password for alvas: 
Collecting wit
  Using cached wit-1.1.tar.gz
Building wheels for collected packages: wit
  Running setup.py bdist_wheel for wit
  Complete output from command /usr/bin/python3 -c "import setuptools;__file__='/tmp/pip-build-hxi3hs02/wit/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmp_2xpbe0opip-wheel-:
  running bdist_wheel
  running build
  Retrieving platform-specific libwit library... libwit-64-linux.a
  running build_ext
  building 'wit' extension
  creating build
  creating build/temp.linux-x86_64-3.4
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -Ilibwit/include -I/usr/include/python3.4m -c pywit.c -o build/temp.linux-x86_64-3.4/pywit.o
  pywit.c:18:18: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
   static PyObject *pywit_close()
                    ^
  pywit.c:57:18: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
   static PyObject *pywit_voice_query_stop()
                    ^
  pywit.c: In function ‘initwit’:
  pywit.c:183:2: warning: implicit declaration of function ‘Py_InitModule’ [-Wimplicit-function-declaration]
    m = Py_InitModule("wit", WitMethods);
    ^
  pywit.c:183:4: warning: assignment makes pointer from integer without a cast [enabled by default]
    m = Py_InitModule("wit", WitMethods);
      ^
  pywit.c:185:3: warning: ‘return’ with no value, in function returning non-void [-Wreturn-type]
     return;
     ^
  creating build/lib.linux-x86_64-3.4
  x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.4/pywit.o -Llibwit/lib -lwit -lrt -lsox -lssl -lcrypto -ldl -lpthread -lrt -lgcc_s -lpthread -lc -lm -o build/lib.linux-x86_64-3.4/wit.cpython-34m.so
  /usr/bin/ld: cannot find -lsox
  collect2: error: ld returned 1 exit status
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for wit
Failed to build wit
Installing collected packages: wit
  Running setup.py install for wit
    Complete output from command /usr/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip-build-hxi3hs02/wit/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-ajpcpgli-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_ext
    building 'wit' extension
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -Ilibwit/include -I/usr/include/python3.4m -c pywit.c -o build/temp.linux-x86_64-3.4/pywit.o
    pywit.c:18:18: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
     static PyObject *pywit_close()
                      ^
    pywit.c:57:18: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
     static PyObject *pywit_voice_query_stop()
                      ^
    pywit.c: In function ‘initwit’:
    pywit.c:183:2: warning: implicit declaration of function ‘Py_InitModule’ [-Wimplicit-function-declaration]
      m = Py_InitModule("wit", WitMethods);
      ^
    pywit.c:183:4: warning: assignment makes pointer from integer without a cast [enabled by default]
      m = Py_InitModule("wit", WitMethods);
        ^
    pywit.c:185:3: warning: ‘return’ with no value, in function returning non-void [-Wreturn-type]
       return;
       ^
    x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.4/pywit.o -Llibwit/lib -lwit -lrt -lsox -lssl -lcrypto -ldl -lpthread -lrt -lgcc_s -lpthread -lc -lm -o build/lib.linux-x86_64-3.4/wit.cpython-34m.so
    /usr/bin/ld: cannot find -lsox
    collect2: error: ld returned 1 exit status
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip-build-hxi3hs02/wit/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-ajpcpgli-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-hxi3hs02/wit

How could I install wit.ai and pywit on ubuntu?

3
  • Dis you install libsox-dev first as mentioned on their website? I would also try to install some build tools and definitely the Python development headers too: sudo apt-get install build-essential libpython-dev
    – Timo
    Jun 19, 2015 at 11:00
  • yes libpython-dev is installed but pywit is not installing.
    – alvas
    Jun 19, 2015 at 12:35
  • ahhh, libsox-dev is mising, python env mistakes =)
    – alvas
    Jun 19, 2015 at 17:46

1 Answer 1

1

/usr/bin/ld: cannot find -lsox

As mentioned in the first comment, you are missing libsox.

2
  • And how can I get it? I'm working on mac Nov 12, 2015 at 9:06
  • It says right in the quickstart linked in the question.
    – raylu
    Nov 12, 2015 at 20:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .