Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

Cant install pocketsphinx on python 3.7.7. #61

Open
nag0811 opened this issue Jul 21, 2020 · 5 comments
Open

Cant install pocketsphinx on python 3.7.7. #61

nag0811 opened this issue Jul 21, 2020 · 5 comments

Comments

@nag0811
Copy link

nag0811 commented Jul 21, 2020

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>

@andrewbowen19
Copy link

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.

@thorwhalen
Copy link

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

@mirfan899
Copy link

Same issue here.
#28 (comment)
check it for the solution.

@bpw1009
Copy link

bpw1009 commented Nov 25, 2020

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?

@rbrisita
Copy link

rbrisita commented Jan 3, 2021

Anyone with Windows, follow these steps before install:

choco install swig
choco install VisualCppBuildTools

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

No branches or pull requests

6 participants