pocketsphinx-python icon indicating copy to clipboard operation
pocketsphinx-python copied to clipboard

Cant install pocketsphinx on python 3.7.7.

Open nag0811 opened this issue 5 years ago • 5 comments

Hi, I am not able to install pocketsphinx on python 3.7.7. Can you please help me in resolving the issue.

Thanks Nagaraju

(base) C:\Users\nb185041>pip install --upgrade pocketsphinx Collecting pocketsphinx Using cached pocketsphinx-0.1.15.tar.gz (29.1 MB) Building wheels for collected packages: pocketsphinx Building wheel for pocketsphinx (setup.py) ... error ERROR: Command errored out with exit status 1: command: 'c:\programdata\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\nb185041\AppData\Local\Temp\pip-install-6uxf38zj\pocketsphinx\setup.py'"'"'; file='"'"'C:\Users\nb185041\AppData\Local\Temp\pip-install-6uxf38zj\pocketsphinx\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 'C:\Users\nb185041\AppData\Local\Temp\pip-wheel-1nnzmhii' cwd: C:\Users\nb185041\AppData\Local\Temp\pip-install-6uxf38zj\pocketsphinx
Complete output (29 lines): running bdist_wheel running build_ext building 'sphinxbase._sphinxbase' extension swigging deps/sphinxbase/swig/sphinxbase.i to deps/sphinxbase/swig/sphinxbase_wrap.c C:\ProgramData\Anaconda3\swig.exe -python -modern -threads -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/win32 -Ideps/sphinxbase/swig -outdir sphinxbase -o deps/sphinxbase/swig/sphinxbase_wrap.c deps/sphinxbase/swig/sphinxbase.i creating build creating build\temp.win-amd64-3.7 creating build\temp.win-amd64-3.7\Release creating build\temp.win-amd64-3.7\Release\deps creating build\temp.win-amd64-3.7\Release\deps\sphinxbase creating build\temp.win-amd64-3.7\Release\deps\sphinxbase\src creating build\temp.win-amd64-3.7\Release\deps\sphinxbase\src\libsphinxbase creating build\temp.win-amd64-3.7\Release\deps\sphinxbase\src\libsphinxbase\lm creating build\temp.win-amd64-3.7\Release\deps\sphinxbase\src\libsphinxbase\feat creating build\temp.win-amd64-3.7\Release\deps\sphinxbase\src\libsphinxbase\util creating build\temp.win-amd64-3.7\Release\deps\sphinxbase\src\libsphinxbase\fe creating build\temp.win-amd64-3.7\Release\deps\sphinxbase\swig C:\ProgramData\Anaconda3\Library\mingw-w64\bin\gcc.exe -mdll -O -Wall -DMS_WIN64 -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DSPHINX_DLL -DHAVE_CONFIG_H -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/win32 -Ic:\programdata\anaconda3\include -Ic:\programdata\anaconda3\include -c deps/sphinxbase/src/libsphinxbase/lm\fsg_model.c -o build\temp.win-amd64-3.7\Release\deps\sphinxbase\src\libsphinxbase\lm\fsg_model.o /wd4244 /wd4267 /wd4197 /wd4090 /wd4018 /wd4311 /wd4312 /wd4334 /wd4477 /wd4996 gcc: error: /wd4244: No such file or directory gcc: error: /wd4267: No such file or directory gcc: error: /wd4197: No such file or directory gcc: error: /wd4090: No such file or directory gcc: error: /wd4018: No such file or directory gcc: error: /wd4311: No such file or directory gcc: error: /wd4312: No such file or directory gcc: error: /wd4334: No such file or directory gcc: error: /wd4477: No such file or directory gcc: error: /wd4996: No such file or directory error: command 'C:\ProgramData\Anaconda3\Library\mingw-w64\bin\gcc.exe' failed with exit status 1

ERROR: Failed building wheel for pocketsphinx Running setup.py clean for pocketsphinx Failed to build pocketsphinx Installing collected packages: pocketsphinx Running setup.py install for pocketsphinx ... error ERROR: Command errored out with exit status 1: command: 'c:\programdata\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\nb185041\AppData\Local\Temp\pip-install-6uxf38zj\pocketsphinx\setup.py'"'"'; file='"'"'C:\Users\nb185041\AppData\Local\Temp\pip-install-6uxf38zj\pocketsphinx\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\nb185041\AppData\Local\Temp\pip-record-0h278f1y\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\programdata\anaconda3\Include\pocketsphinx' cwd: C:\Users\nb185041\AppData\Local\Temp\pip-install-6uxf38zj\pocketsphinx
Complete output (29 lines): running install running build_ext building 'sphinxbase._sphinxbase' extension swigging deps/sphinxbase/swig/sphinxbase.i to deps/sphinxbase/swig/sphinxbase_wrap.c C:\ProgramData\Anaconda3\swig.exe -python -modern -threads -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/win32 -Ideps/sphinxbase/swig -outdir sphinxbase -o deps/sphinxbase/swig/sphinxbase_wrap.c deps/sphinxbase/swig/sphinxbase.i creating build creating build\temp.win-amd64-3.7 creating build\temp.win-amd64-3.7\Release creating build\temp.win-amd64-3.7\Release\deps creating build\temp.win-amd64-3.7\Release\deps\sphinxbase creating build\temp.win-amd64-3.7\Release\deps\sphinxbase\src creating build\temp.win-amd64-3.7\Release\deps\sphinxbase\src\libsphinxbase creating build\temp.win-amd64-3.7\Release\deps\sphinxbase\src\libsphinxbase\lm creating build\temp.win-amd64-3.7\Release\deps\sphinxbase\src\libsphinxbase\feat creating build\temp.win-amd64-3.7\Release\deps\sphinxbase\src\libsphinxbase\util creating build\temp.win-amd64-3.7\Release\deps\sphinxbase\src\libsphinxbase\fe creating build\temp.win-amd64-3.7\Release\deps\sphinxbase\swig C:\ProgramData\Anaconda3\Library\mingw-w64\bin\gcc.exe -mdll -O -Wall -DMS_WIN64 -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DSPHINX_DLL -DHAVE_CONFIG_H -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/win32 -Ic:\programdata\anaconda3\include -Ic:\programdata\anaconda3\include -c deps/sphinxbase/src/libsphinxbase/lm\fsg_model.c -o build\temp.win-amd64-3.7\Release\deps\sphinxbase\src\libsphinxbase\lm\fsg_model.o /wd4244 /wd4267 /wd4197 /wd4090 /wd4018 /wd4311 /wd4312 /wd4334 /wd4477 /wd4996 gcc: error: /wd4244: No such file or directory gcc: error: /wd4267: No such file or directory gcc: error: /wd4197: No such file or directory gcc: error: /wd4090: No such file or directory gcc: error: /wd4018: No such file or directory gcc: error: /wd4311: No such file or directory gcc: error: /wd4312: No such file or directory gcc: error: /wd4334: No such file or directory gcc: error: /wd4477: No such file or directory gcc: error: /wd4996: No such file or directory error: command 'C:\ProgramData\Anaconda3\Library\mingw-w64\bin\gcc.exe' failed with exit status 1 ---------------------------------------- ERROR: Command errored out with exit status 1: 'c:\programdata\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\nb185041\AppData\Local\Temp\pip-install-6uxf38zj\pocketsphinx\setup.py'"'"'; file='"'"'C:\Users\nb185041\AppData\Local\Temp\pip-install-6uxf38zj\pocketsphinx\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\nb185041\AppData\Local\Temp\pip-record-0h278f1y\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\programdata\anaconda3\Include\pocketsphinx' Check the logs for full command output.

(base) C:\Users\nb185041> (base) C:\Users\nb185041>

nag0811 avatar Jul 21 '20 04:07 nag0811

Having this same issue with the gcc error on MacOS. Have tried both:

brew install gcc

as well as

brew reinstall gcc

Have been unable to install with pip.

andrewbowen19 avatar Sep 30 '20 00:09 andrewbowen19

Same here with python 3.8.2, on MacOS 10.14.6 (Mojave).

thorwhalen avatar Oct 03 '20 16:10 thorwhalen

Same issue here. https://github.com/bambocher/pocketsphinx-python/issues/28#issue-250437403 check it for the solution.

mirfan899 avatar Oct 24 '20 06:10 mirfan899

I had a similar issue on Windows with python 3.7.6. First I got a message saying it couldn't find swig.exe. I installed swig. Then I got "No such file or directory" for cl.exe. I tried installing Visual Studio with C++ a few times and fiddling with the path / environment variable and nothing worked. Eventually, I just tried a conda environment that I had previously created with python 3.6. That worked.

Would it be possible to include in the error message something about the python version?

bpw1009 avatar Nov 25 '20 16:11 bpw1009

Anyone with Windows, follow these steps before install:

choco install swig
choco install VisualCppBuildTools

rbrisita avatar Jan 03 '21 11:01 rbrisita