簡體   English   中英

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'
])

您有兩種選擇:

  1. 對於使用MSVC編譯的Windows使用默認的python

  2. 從setup.py中刪除extra_compile_args ,然后該軟件包可能將使用MinGW gcc構建。

Christoph Gohlke友善地將Pocketsphinx的編譯版本添加到了他的非正式擴展庫中。

如果您運行的是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”

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM