Windows 上的 Pocketsphinx-python 安装错误
Pocketsphinx-python installation error on Windows
我一直在尝试在笔记本电脑上安装 pocketsphinx。我已经安装了所有依赖项,仍然不断出现以下错误。 GCC.exe 在文件夹中退出并添加到环境变量中。感谢所有帮助
Source in c:\users\archana\appdata\local\temp\pip_build_archana\pocketsphinx has version 0.0.4, which satisfies requirement pocketsphinx
Installing collected packages: pocketsphinx
Running setup.py install for pocketsphinx
Running command C:\Users\ARCHANA\Anaconda\python.exe -c "import setuptools, tokenize;__file__='c:\users\archana\appdata\local\temp\pip_build_ARCHANA\pocketsphinx\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\archana\appdata\local\temp\pip-f_ai9e-record\install-record.txt --single-version-externally-managed --compile
running install
running build
running build_py
creating build
creating build\lib.win-amd64-2.7
creating build\lib.win-amd64-2.7\sphinxbase
copying sphinxbase\swig\python\sphinxbase.py -> build\lib.win-amd64-2.7\sphinxbase
copying sphinxbase\swig\python\__init__.py -> build\lib.win-amd64-2.7\sphinxbase
creating build\lib.win-amd64-2.7\pocketsphinx
copying pocketsphinx\swig\python\pocketsphinx.py -> build\lib.win-amd64-2.7\pocketsphinx
copying pocketsphinx\swig\python\__init__.py -> build\lib.win-amd64-2.7\pocketsphinx
running build_ext
building 'sphinxbase._sphinxbase' extension
swigging sphinxbase/swig/sphinxbase.i to sphinxbase/swig/sphinxbase_wrap.c
C:\Users\ARCHANA\Anaconda\swigwin-3.0.5\swig.exe -python -modern -Isphinxbase/include -Isphinxbase/include/sphinxbase -Isphinxbase/include/win32 -outdir sphinxbase/swig/python -o sphinxbase/swig/sphinxbase_wrap.c sphinxbase/swig/sphinxbase.i
creating build\temp.win-amd64-2.7
creating build\temp.win-amd64-2.7\Release
creating build\temp.win-amd64-2.7\Release\sphinxbase
creating build\temp.win-amd64-2.7\Release\sphinxbase\src
creating build\temp.win-amd64-2.7\Release\sphinxbase\src\libsphinxbase
creating build\temp.win-amd64-2.7\Release\sphinxbase\src\libsphinxbase\lm
creating build\temp.win-amd64-2.7\Release\sphinxbase\src\libsphinxbase\feat
creating build\temp.win-amd64-2.7\Release\sphinxbase\src\libsphinxbase\util
creating build\temp.win-amd64-2.7\Release\sphinxbase\src\libsphinxbase\fe
creating build\temp.win-amd64-2.7\Release\sphinxbase\src\libsphinxad
creating build\temp.win-amd64-2.7\Release\sphinxbase\swig
C:\Users\ARCHANA\Anaconda\Scripts\gcc.bat -DMS_WIN64 -mdll -O -Wall -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DHAVE_CONFIG_H -D_CRT_SECURE_NO_DEPRECATE -D_USRDLL -DSPHINXDLL -DWIN32 -D_WINDOWS -DYY_NO_UNISTD_H -Isphinxbase/include -Isphinxbase/include/sphinxbase -Isphinxbase/include/win32 -IC:\Users\ARCHANA\Anaconda\include -IC:\Users\ARCHANA\Anaconda\PC -c sphinxbase/src/libsphinxbase/lm\fsg_model.c -o build\temp.win-amd64-2.7\Release\sphinxbase\src\libsphinxbase\lm\fsg_model.o /wd4244 /wd4090 /wd4018
gcc.exe: error: /wd4244: No such file or directory
gcc.exe: error: /wd4090: No such file or directory
gcc.exe: error: /wd4018: No such file or directory
error: command 'gcc' failed with exit status 1
Complete output from command C:\Users\ARCHANA\Anaconda\python.exe -c "import setuptools, tokenize;__file__='c:\users\archana\appdata\local\temp\pip_build_ARCHANA\pocketsphinx\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\archana\appdata\local\temp\pip-f_ai9e-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-2.7
creating build\lib.win-amd64-2.7\sphinxbase
copying sphinxbase\swig\python\sphinxbase.py -> build\lib.win-amd64-2.7\sphinxbase
copying sphinxbase\swig\python\__init__.py -> build\lib.win-amd64-2.7\sphinxbase
creating build\lib.win-amd64-2.7\pocketsphinx
copying pocketsphinx\swig\python\pocketsphinx.py -> build\lib.win-amd64-2.7\pocketsphinx
copying pocketsphinx\swig\python\__init__.py -> build\lib.win-amd64-2.7\pocketsphinx
running build_ext
building 'sphinxbase._sphinxbase' extension
swigging sphinxbase/swig/sphinxbase.i to sphinxbase/swig/sphinxbase_wrap.c
C:\Users\ARCHANA\Anaconda\swigwin-3.0.5\swig.exe -python -modern -Isphinxbase/include -Isphinxbase/include/sphinxbase -Isphinxbase/include/win32 -outdir sphinxbase/swig/python -o sphinxbase/swig/sphinxbase_wrap.c sphinxbase/swig/sphinxbase.i
creating build\temp.win-amd64-2.7
creating build\temp.win-amd64-2.7\Release
creating build\temp.win-amd64-2.7\Release\sphinxbase
creating build\temp.win-amd64-2.7\Release\sphinxbase\src
creating build\temp.win-amd64-2.7\Release\sphinxbase\src\libsphinxbase
creating build\temp.win-amd64-2.7\Release\sphinxbase\src\libsphinxbase\lm
creating build\temp.win-amd64-2.7\Release\sphinxbase\src\libsphinxbase\feat
creating build\temp.win-amd64-2.7\Release\sphinxbase\src\libsphinxbase\util
creating build\temp.win-amd64-2.7\Release\sphinxbase\src\libsphinxbase\fe
creating build\temp.win-amd64-2.7\Release\sphinxbase\src\libsphinxad
creating build\temp.win-amd64-2.7\Release\sphinxbase\swig
C:\Users\ARCHANA\Anaconda\Scripts\gcc.bat -DMS_WIN64 -mdll -O -Wall -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DHAVE_CONFIG_H -D_CRT_SECURE_NO_DEPRECATE -D_USRDLL -DSPHINXDLL -DWIN32 -D_WINDOWS -DYY_NO_UNISTD_H -Isphinxbase/include -Isphinxbase/include/sphinxbase -Isphinxbase/include/win32 -IC:\Users\ARCHANA\Anaconda\include -IC:\Users\ARCHANA\Anaconda\PC -c sphinxbase/src/libsphinxbase/lm\fsg_model.c -o build\temp.win-amd64-2.7\Release\sphinxbase\src\libsphinxbase\lm\fsg_model.o /wd4244 /wd4090 /wd4018
gcc.exe: error: /wd4244: No such file or directory
gcc.exe: error: /wd4090: No such file or directory
gcc.exe: error: /wd4018: No such file or directory
error: command 'gcc' failed with exit status 1
----------------------------------------
Cleaning up...
Removing temporary dir c:\users\archana\appdata\local\temp\pip_build_ARCHANA...
Command C:\Users\ARCHANA\Anaconda\python.exe -c "import setuptools, tokenize;__file__='c:\users\archana\appdata\local\temp\pip_build_ARCHANA\pocketsphinx\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\archana\appdata\local\temp\pip-f_ai9e-record\install-record.txt --single-version-externally-managed --compile failed with error code 1 in c:\users\archana\appdata\local\temp\pip_build_ARCHANA\pocketsphinx
Exception information:
Traceback (most recent call last):
File "C:\Users\ARCHANA\Anaconda\lib\site-packages\pip\basecommand.py", line 122, in main
status = self.run(options, args)
File "C:\Users\ARCHANA\Anaconda\lib\site-packages\pip\commands\install.py", line 279, in run
requirement_set.install(install_options, global_options, root=options.root_path)
File "C:\Users\ARCHANA\Anaconda\lib\site-packages\pip\req.py", line 1380, in install
requirement.install(install_options, global_options, *args, **kwargs)
File "C:\Users\ARCHANA\Anaconda\lib\site-packages\pip\req.py", line 699, in install
cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
File "C:\Users\ARCHANA\Anaconda\lib\site-packages\pip\util.py", line 697, in call_subprocess
% (command_desc, proc.returncode, cwd))
InstallationError: Command C:\Users\ARCHANA\Anaconda\python.exe -c "import setuptools, tokenize;__file__='c:\users\archana\appdata\local\temp\pip_build_ARCHANA\pocketsphinx\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\archana\appdata\local\temp\pip-f_ai9e-record\install-record.txt --single-version-externally-managed --compile failed with error code 1 in c:\users\archana\appdata\local\temp\pip_build_ARCHANA\pocketsphinx
您似乎正在使用由 MinGW 构建的 Anaconda python。自述文件中提到的默认 pocketsphinx-python 应该与 MSVC python 一起工作(从 python.org 分发),因此它与 GCC python 不兼容,因为它使用了一些setup.py 中的 MSVC 特定选项:
extra_compile_args.extend([
'/wd4244',
'/wd4267',
'/wd4197',
'/wd4090',
'/wd4018'
])
你有两个选择:
为使用 MSVC
编译的 Windows 使用默认值 python
从 setup.py 中删除 extra_compile_args
,然后包可能会使用 MinGW gcc 构建。
Christoph Gohlke 将 pocketsphinx 的编译版本添加到他的非官方扩展库中。
如果您是 运行ning Python 3.5(32 位),则下载:"pocketsphinx-0.0.9-cp35-cp35m-win32.whl"
此处:http://www.lfd.uci.edu/~gohlke/pythonlibs/#pocketsphinx
然后运行:
pip3 安装 "pocketsphinx-0.0.9-cp35-cp35m-win32.whl"
我一直在尝试在笔记本电脑上安装 pocketsphinx。我已经安装了所有依赖项,仍然不断出现以下错误。 GCC.exe 在文件夹中退出并添加到环境变量中。感谢所有帮助
Source in c:\users\archana\appdata\local\temp\pip_build_archana\pocketsphinx has version 0.0.4, which satisfies requirement pocketsphinx
Installing collected packages: pocketsphinx
Running setup.py install for pocketsphinx
Running command C:\Users\ARCHANA\Anaconda\python.exe -c "import setuptools, tokenize;__file__='c:\users\archana\appdata\local\temp\pip_build_ARCHANA\pocketsphinx\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\archana\appdata\local\temp\pip-f_ai9e-record\install-record.txt --single-version-externally-managed --compile
running install
running build
running build_py
creating build
creating build\lib.win-amd64-2.7
creating build\lib.win-amd64-2.7\sphinxbase
copying sphinxbase\swig\python\sphinxbase.py -> build\lib.win-amd64-2.7\sphinxbase
copying sphinxbase\swig\python\__init__.py -> build\lib.win-amd64-2.7\sphinxbase
creating build\lib.win-amd64-2.7\pocketsphinx
copying pocketsphinx\swig\python\pocketsphinx.py -> build\lib.win-amd64-2.7\pocketsphinx
copying pocketsphinx\swig\python\__init__.py -> build\lib.win-amd64-2.7\pocketsphinx
running build_ext
building 'sphinxbase._sphinxbase' extension
swigging sphinxbase/swig/sphinxbase.i to sphinxbase/swig/sphinxbase_wrap.c
C:\Users\ARCHANA\Anaconda\swigwin-3.0.5\swig.exe -python -modern -Isphinxbase/include -Isphinxbase/include/sphinxbase -Isphinxbase/include/win32 -outdir sphinxbase/swig/python -o sphinxbase/swig/sphinxbase_wrap.c sphinxbase/swig/sphinxbase.i
creating build\temp.win-amd64-2.7
creating build\temp.win-amd64-2.7\Release
creating build\temp.win-amd64-2.7\Release\sphinxbase
creating build\temp.win-amd64-2.7\Release\sphinxbase\src
creating build\temp.win-amd64-2.7\Release\sphinxbase\src\libsphinxbase
creating build\temp.win-amd64-2.7\Release\sphinxbase\src\libsphinxbase\lm
creating build\temp.win-amd64-2.7\Release\sphinxbase\src\libsphinxbase\feat
creating build\temp.win-amd64-2.7\Release\sphinxbase\src\libsphinxbase\util
creating build\temp.win-amd64-2.7\Release\sphinxbase\src\libsphinxbase\fe
creating build\temp.win-amd64-2.7\Release\sphinxbase\src\libsphinxad
creating build\temp.win-amd64-2.7\Release\sphinxbase\swig
C:\Users\ARCHANA\Anaconda\Scripts\gcc.bat -DMS_WIN64 -mdll -O -Wall -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DHAVE_CONFIG_H -D_CRT_SECURE_NO_DEPRECATE -D_USRDLL -DSPHINXDLL -DWIN32 -D_WINDOWS -DYY_NO_UNISTD_H -Isphinxbase/include -Isphinxbase/include/sphinxbase -Isphinxbase/include/win32 -IC:\Users\ARCHANA\Anaconda\include -IC:\Users\ARCHANA\Anaconda\PC -c sphinxbase/src/libsphinxbase/lm\fsg_model.c -o build\temp.win-amd64-2.7\Release\sphinxbase\src\libsphinxbase\lm\fsg_model.o /wd4244 /wd4090 /wd4018
gcc.exe: error: /wd4244: No such file or directory
gcc.exe: error: /wd4090: No such file or directory
gcc.exe: error: /wd4018: No such file or directory
error: command 'gcc' failed with exit status 1
Complete output from command C:\Users\ARCHANA\Anaconda\python.exe -c "import setuptools, tokenize;__file__='c:\users\archana\appdata\local\temp\pip_build_ARCHANA\pocketsphinx\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\archana\appdata\local\temp\pip-f_ai9e-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-2.7
creating build\lib.win-amd64-2.7\sphinxbase
copying sphinxbase\swig\python\sphinxbase.py -> build\lib.win-amd64-2.7\sphinxbase
copying sphinxbase\swig\python\__init__.py -> build\lib.win-amd64-2.7\sphinxbase
creating build\lib.win-amd64-2.7\pocketsphinx
copying pocketsphinx\swig\python\pocketsphinx.py -> build\lib.win-amd64-2.7\pocketsphinx
copying pocketsphinx\swig\python\__init__.py -> build\lib.win-amd64-2.7\pocketsphinx
running build_ext
building 'sphinxbase._sphinxbase' extension
swigging sphinxbase/swig/sphinxbase.i to sphinxbase/swig/sphinxbase_wrap.c
C:\Users\ARCHANA\Anaconda\swigwin-3.0.5\swig.exe -python -modern -Isphinxbase/include -Isphinxbase/include/sphinxbase -Isphinxbase/include/win32 -outdir sphinxbase/swig/python -o sphinxbase/swig/sphinxbase_wrap.c sphinxbase/swig/sphinxbase.i
creating build\temp.win-amd64-2.7
creating build\temp.win-amd64-2.7\Release
creating build\temp.win-amd64-2.7\Release\sphinxbase
creating build\temp.win-amd64-2.7\Release\sphinxbase\src
creating build\temp.win-amd64-2.7\Release\sphinxbase\src\libsphinxbase
creating build\temp.win-amd64-2.7\Release\sphinxbase\src\libsphinxbase\lm
creating build\temp.win-amd64-2.7\Release\sphinxbase\src\libsphinxbase\feat
creating build\temp.win-amd64-2.7\Release\sphinxbase\src\libsphinxbase\util
creating build\temp.win-amd64-2.7\Release\sphinxbase\src\libsphinxbase\fe
creating build\temp.win-amd64-2.7\Release\sphinxbase\src\libsphinxad
creating build\temp.win-amd64-2.7\Release\sphinxbase\swig
C:\Users\ARCHANA\Anaconda\Scripts\gcc.bat -DMS_WIN64 -mdll -O -Wall -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DHAVE_CONFIG_H -D_CRT_SECURE_NO_DEPRECATE -D_USRDLL -DSPHINXDLL -DWIN32 -D_WINDOWS -DYY_NO_UNISTD_H -Isphinxbase/include -Isphinxbase/include/sphinxbase -Isphinxbase/include/win32 -IC:\Users\ARCHANA\Anaconda\include -IC:\Users\ARCHANA\Anaconda\PC -c sphinxbase/src/libsphinxbase/lm\fsg_model.c -o build\temp.win-amd64-2.7\Release\sphinxbase\src\libsphinxbase\lm\fsg_model.o /wd4244 /wd4090 /wd4018
gcc.exe: error: /wd4244: No such file or directory
gcc.exe: error: /wd4090: No such file or directory
gcc.exe: error: /wd4018: No such file or directory
error: command 'gcc' failed with exit status 1
----------------------------------------
Cleaning up...
Removing temporary dir c:\users\archana\appdata\local\temp\pip_build_ARCHANA...
Command C:\Users\ARCHANA\Anaconda\python.exe -c "import setuptools, tokenize;__file__='c:\users\archana\appdata\local\temp\pip_build_ARCHANA\pocketsphinx\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\archana\appdata\local\temp\pip-f_ai9e-record\install-record.txt --single-version-externally-managed --compile failed with error code 1 in c:\users\archana\appdata\local\temp\pip_build_ARCHANA\pocketsphinx
Exception information:
Traceback (most recent call last):
File "C:\Users\ARCHANA\Anaconda\lib\site-packages\pip\basecommand.py", line 122, in main
status = self.run(options, args)
File "C:\Users\ARCHANA\Anaconda\lib\site-packages\pip\commands\install.py", line 279, in run
requirement_set.install(install_options, global_options, root=options.root_path)
File "C:\Users\ARCHANA\Anaconda\lib\site-packages\pip\req.py", line 1380, in install
requirement.install(install_options, global_options, *args, **kwargs)
File "C:\Users\ARCHANA\Anaconda\lib\site-packages\pip\req.py", line 699, in install
cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
File "C:\Users\ARCHANA\Anaconda\lib\site-packages\pip\util.py", line 697, in call_subprocess
% (command_desc, proc.returncode, cwd))
InstallationError: Command C:\Users\ARCHANA\Anaconda\python.exe -c "import setuptools, tokenize;__file__='c:\users\archana\appdata\local\temp\pip_build_ARCHANA\pocketsphinx\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\archana\appdata\local\temp\pip-f_ai9e-record\install-record.txt --single-version-externally-managed --compile failed with error code 1 in c:\users\archana\appdata\local\temp\pip_build_ARCHANA\pocketsphinx
您似乎正在使用由 MinGW 构建的 Anaconda python。自述文件中提到的默认 pocketsphinx-python 应该与 MSVC python 一起工作(从 python.org 分发),因此它与 GCC python 不兼容,因为它使用了一些setup.py 中的 MSVC 特定选项:
extra_compile_args.extend([
'/wd4244',
'/wd4267',
'/wd4197',
'/wd4090',
'/wd4018'
])
你有两个选择:
为使用 MSVC
编译的 Windows 使用默认值 python
从 setup.py 中删除
extra_compile_args
,然后包可能会使用 MinGW gcc 构建。
Christoph Gohlke 将 pocketsphinx 的编译版本添加到他的非官方扩展库中。
如果您是 运行ning Python 3.5(32 位),则下载:"pocketsphinx-0.0.9-cp35-cp35m-win32.whl"
此处:http://www.lfd.uci.edu/~gohlke/pythonlibs/#pocketsphinx
然后运行: pip3 安装 "pocketsphinx-0.0.9-cp35-cp35m-win32.whl"