I install the anaconda3,and use pip install textract in the cmd window.
However, the install is incomplete. This causes other codes to have problems with its invocation.
The warning is as follows:
Building wheels for collected packages: pocketsphinx
Running setup.py bdist_wheel for pocketsphinx … error
Complete output from command C:UserswAnaconda3python.exe -u -c «import setuptools, tokenize;file=’C:UserswAppDataLocalTemppip-build-l78y971lpocketsphinxsetup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(‘rn’, ‘n’);f.close();exec(compile(code, file, ‘exec’))» bdist_wheel -d C:UserswAppDataLocalTemptmplpi7yv4zpip-wheel- —python-tag cp36:
running bdist_wheel
running build_ext
building ‘sphinxbase._ad’ extension
swigging swig/sphinxbase/ad.i to swig/sphinxbase/ad_wrap.c
swig.exe -python -modern -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/win32 -Ideps/sphinxbase/swig -outdir sphinxbase -o swig/sphinxbase/ad_wrap.c swig/sphinxbase/ad.i
error: command ‘swig.exe’ failed: No such file or directory
Failed building wheel for pocketsphinx
Running setup.py clean for pocketsphinx
Failed to build pocketsphinx
Installing collected packages: python-pptx, beautifulsoup4, six, EbookLib, chardet, docx2txt, xlrd, argcomplete, pocketsphinx, SpeechRecognition, textract
Found existing installation: beautifulsoup4 4.6.0
Uninstalling beautifulsoup4-4.6.0:
Successfully uninstalled beautifulsoup4-4.6.0
Found existing installation: six 1.11.0
Uninstalling six-1.11.0:
Successfully uninstalled six-1.11.0
Found existing installation: chardet 3.0.4
Uninstalling chardet-3.0.4:
Successfully uninstalled chardet-3.0.4
Found existing installation: xlrd 1.1.0
Uninstalling xlrd-1.1.0:
Successfully uninstalled xlrd-1.1.0
Running setup.py install for pocketsphinx … error
Complete output from command C:UserswAnaconda3python.exe -u -c «import setuptools, tokenize;file=’C:UserswAppDataLocalTemppip-build-l78y971lpocketsphinxsetup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(‘rn’, ‘n’);f.close();exec(compile(code, file, ‘exec’))» install —record C:UserswAppDataLocalTemppip-rdnf9rb9-recordinstall-record.txt —single-version-externally-managed —compile:
running install
running build_ext
building ‘sphinxbase._ad’ extension
swigging swig/sphinxbase/ad.i to swig/sphinxbase/ad_wrap.c
swig.exe -python -modern -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/win32 -Ideps/sphinxbase/swig -outdir sphinxbase -o swig/sphinxbase/ad_wrap.c swig/sphinxbase/ad.i
error: command ‘swig.exe’ failed: No such file or directory
----------------------------------------
Command «C:UserswAnaconda3python.exe -u -c «import setuptools, tokenize;file=’C:UserswAppDataLocalTemppip-build-l78y971lpocketsphinxsetup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(‘rn’, ‘n’);f.close();exec(compile(code, file, ‘exec’))» install —record C:UserswAppDataLocalTemppip-rdnf9rb9-recordinstall-record.txt —single-version-externally-managed —compile» failed with error code 1 in C:UserswAppDataLocalTemppip-build-l78y971lpocketsphinx
-
Zilla707
- Posts: 83
- Joined: Fri Aug 23, 2019 11:04 pm
PocketSphinx won’t install
Hello, I am trying to get pocketsphinx to install on a laptop running the ras pi desktop, and have run «pip install pocketsphinx» (I am using python3 and have uninstalled python2’s pip) but after it says:
Code: Select all
pi@ThePiPuter:~ $ pip install pocketsphinx
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting pocketsphinx
Using cached https://files.pythonhosted.org/packages/cd/4a/adea55f189a81aed88efa0b0e1d25628e5ed22622ab9174bf696dd4f9474/pocketsphinx-0.1.15.tar.gz
Building wheels for collected packages: pocketsphinx
Building wheel for pocketsphinx (setup.py) ... |
After that it fills the command line up with errors. Any help?
It also won’t work on my raspberry pi 3 B+, not just the laptop.
Aim for perfect and you’ll hit somewhere near pretty good. (maybe…)
A quick wit is best followed by quick reflexes. (and a Band-Aid…)
-
klricks
- Posts: 8596
- Joined: Sat Jan 12, 2013 3:01 am
- Location: Grants Pass, OR, USA
Re: PocketSphinx won’t install
Mon Sep 09, 2019 11:46 pm
You need to use pip3 for Python 3.
pip = Python 2
Unless specified otherwise my response is based on the latest and fully updated RPi OS Bullseye w/ Desktop OS.
-
Zilla707
- Posts: 83
- Joined: Fri Aug 23, 2019 11:04 pm
Re: PocketSphinx won’t install
Tue Sep 10, 2019 2:04 am
Yes, I know that, I am using pip because I have uninstalled python2 and now «pip» installs for python3. I checked the version with «pip -V» / «pip3 -V» and «pip» says python 3.x. However, even when I had python2, «pip3 install pocketsphinx» still gave me the same errors.
Here’s another part of the error, (the entire thing is too big to paste):
Code: Select all
i686-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.5-F5oRAB/python3.5-3.5.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DSPHINX_DLL -DHAVE_CONFIG_H -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -I/usr/include/python3.5m -c deps/sphinxbase/src/libsphinxad/ad_pulse.c -o build/temp.linux-x86_64-3.5/deps/sphinxbase/src/libsphinxad/ad_pulse.o -Wno-unused-label -Wno-strict-prototypes -Wno-parentheses -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-result -Wno-sign-compare -Wno-misleading-indentation
deps/sphinxbase/src/libsphinxad/ad_pulse.c:44:30: fatal error: pulse/pulseaudio.h: No such file or directory
#include <pulse/pulseaudio.h>
^
compilation terminated.
error: command 'i686-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for pocketsphinx-fork
Running setup.py clean for pocketsphinx-fork
Failed to build pocketsphinx-fork
Installing collected packages: pocketsphinx-fork
Running setup.py install for pocketsphinx-fork ... /
Aim for perfect and you’ll hit somewhere near pretty good. (maybe…)
A quick wit is best followed by quick reflexes. (and a Band-Aid…)
Return to “Raspberry Pi Desktop for PC and Mac”
Hi all. I come from Linux so this is a new environment to me. I am trying to download PocketSphinx
via pip
but I get the following error:
# pip install PocketSphinx
Collecting PocketSphinx
Using cached https://files.pythonhosted.org/packages/cd/4a/adea55f189a81aed88efa0b0e1d25628e5ed22622ab9174bf696dd4f9474/pocketsphinx-0.1.15.tar.gz
Building wheels for collected packages: PocketSphinx
Building wheel for PocketSphinx (setup.py) ... error
ERROR: Complete output from command /usr/local/bin/python3.7 -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-e606gwnf/PocketSphinx/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-695tkiy6 --python-tag cp37:
ERROR: running bdist_wheel
running build_ext
building 'sphinxbase._sphinxbase' extension
swigging deps/sphinxbase/swig/sphinxbase.i to deps/sphinxbase/swig/sphinxbase_wrap.c
swig -python -modern -threads -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/swig -outdir sphinxbase -o deps/sphinxbase/swig/sphinxbase_wrap.c deps/sphinxbase/swig/sphinxbase.i
unable to execute 'swig': No such file or directory
error: command 'swig' 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: Complete output from command /usr/local/bin/python3.7 -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-e606gwnf/PocketSphinx/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-maq7pq9b/install-record.txt --single-version-externally-managed --compile:
ERROR: running install
running build_ext
building 'sphinxbase._sphinxbase' extension
swigging deps/sphinxbase/swig/sphinxbase.i to deps/sphinxbase/swig/sphinxbase_wrap.c
swig -python -modern -threads -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/swig -outdir sphinxbase -o deps/sphinxbase/swig/sphinxbase_wrap.c deps/sphinxbase/swig/sphinxbase.i
unable to execute 'swig': No such file or directory
error: command 'swig' failed with exit status 1
----------------------------------------
ERROR: Command "/usr/local/bin/python3.7 -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-e606gwnf/PocketSphinx/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-maq7pq9b/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-e606gwnf/PocketSphinx/
So it looks like I need swig
. So I download swig:
# pkg install swig3.0
And I see that the above code uses the executable swig
(not swig3.0
), so I attempt to make an alias:
# alias swig "/usr/local/bin/swig3.0"
# which swig
swig: aliased to /usr/local/bin/swig3.0
Which looks like it works. But I still get the same error: command ‘swig’ not found. Does anyone know how to resolve this issue? I searched online and Linux users say that the package libpulse-dev is required (but this is not available on FreeBSD). I downloaded pulseaudio
but this had no impact on my attempt to download PocketSphinx
.
P.S., I have downloaded pocketsphinx
via pkg
, but the library I am using it with still gives me the error:
...
File "/usr/local/lib/python3.7/site-packages/speech_recognition/__init__.py", line 732, in recognize_sphinx
raise RequestError("missing PocketSphinx module: ensure that PocketSphinx is set up correctly.")
speech_recognition.RequestError: missing PocketSphinx module: ensure that PocketSphinx is set up correctly.
Error installing pocketsphinx
Hello everyone I’m just a beginner got stuck to install pocketsphinx. Thanks for your help.
This is the code:
Collecting pocketsphinx
Using cached pocketsphinx-0.1.3.zip
Building wheels for collected packages: pocketsphinx
Running setup.py bdist_wheel for pocketsphinx ... error
Complete output from command /usr/local/bin/python3.4 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-mj6le7mo/pocketsphinx/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmp301pkae_pip-wheel- --python-tag cp34:
running bdist_wheel
running build_ext
building 'sphinxbase._ad' extension
swigging swig/sphinxbase/ad.i to swig/sphinxbase/ad_wrap.c
swig -python -modern -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -Ideps/sphinxbase/swig -outdir sphinxbase -o swig/sphinxbase/ad_wrap.c swig/sphinxbase/ad.i
creating build
creating build/temp.linux-x86_64-3.4
creating build/temp.linux-x86_64-3.4/swig
creating build/temp.linux-x86_64-3.4/swig/sphinxbase
creating build/temp.linux-x86_64-3.4/deps
creating build/temp.linux-x86_64-3.4/deps/sphinxbase
creating build/temp.linux-x86_64-3.4/deps/sphinxbase/src
creating build/temp.linux-x86_64-3.4/deps/sphinxbase/src/libsphinxad
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 -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DSPHINX_DLL -DHAVE_CONFIG_H -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -I/usr/include/python3.4m -c swig/sphinxbase/ad_wrap.c -o build/temp.linux-x86_64-3.4/swig/sphinxbase/ad_wrap.o -Wno-unused-label -Wno-strict-prototypes -Wno-parentheses -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-result -Wno-sign-compare -Wno-misleading-indentation
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 -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DSPHINX_DLL -DHAVE_CONFIG_H -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -I/usr/include/python3.4m -c deps/sphinxbase/src/libsphinxad/ad_pulse.c -o build/temp.linux-x86_64-3.4/deps/sphinxbase/src/libsphinxad/ad_pulse.o -Wno-unused-label -Wno-strict-prototypes -Wno-parentheses -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-result -Wno-sign-compare -Wno-misleading-indentation
deps/sphinxbase/src/libsphinxad/ad_pulse.c:44:30: fatal error: pulse/pulseaudio.h: No such file or directory
#include <pulse/pulseaudio.h>
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
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
Complete output from command /usr/local/bin/python3.4 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-mj6le7mo/pocketsphinx/setup.py';f=getattr(tokenize, 'ope
n', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-n9hsj8ft-record/install-record.txt --single
-version-externally-managed --compile --user --prefix=:
running install
running build_ext
building 'sphinxbase._ad' extension
swigging swig/sphinxbase/ad.i to swig/sphinxbase/ad_wrap.c
swig -python -modern -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -Ideps/sphinxbase/swig -outdir sphinxbase -o swig/sp
hinxbase/ad_wrap.c swig/sphinxbase/ad.i
creating build
creating build/temp.linux-x86_64-3.4
creating build/temp.linux-x86_64-3.4/swig
creating build/temp.linux-x86_64-3.4/swig/sphinxbase
creating build/temp.linux-x86_64-3.4/deps
creating build/temp.linux-x86_64-3.4/deps/sphinxbase
creating build/temp.linux-x86_64-3.4/deps/sphinxbase/src
creating build/temp.linux-x86_64-3.4/deps/sphinxbase/src/libsphinxad
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 -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DSPHINX_DLL -DHAVE_CONFIG_H -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/incl
ude/android -I/usr/include/python3.4m -c swig/sphinxbase/ad_wrap.c -o build/temp.linux-x86_64-3.4/swig/sphinxbase/ad_wrap.o -Wno-unused-label -Wno-strict-prototypes -Wno-pare
ntheses -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-result -Wno-sign-compare -Wno-misleading-indentation
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 -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DSPHINX_DLL -DHAVE_CONFIG_H -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/incl
ude/android -I/usr/include/python3.4m -c deps/sphinxbase/src/libsphinxad/ad_pulse.c -o build/temp.linux-x86_64-3.4/deps/sphinxbase/src/libsphinxad/ad_pulse.o -Wno-unused-labe
l -Wno-strict-prototypes -Wno-parentheses -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-result -Wno-sign-compare -Wno-misleading-indentation
deps/sphinxbase/src/libsphinxad/ad_pulse.c:44:30: fatal error: pulse/pulseaudio.h: No such file or directory
#include <pulse/pulseaudio.h>
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/usr/local/bin/python3.4 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-mj6le7mo/pocketsphinx/setup.py';f=getattr(tokenize, 'open', open)(__file__);code
=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-n9hsj8ft-record/install-record.txt --single-version-externally-mana
ged --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-mj6le7mo/pocketsphinx/
deleted-user-2692214
|
1
post
|
Aug. 30, 2017, 5:28 a.m.
|
permalink
Unfortunately it looks like pocketsphinx depends on pulseaudio, which is an operating system package. We can install that, but unfortunately it will need a new system image, which won’t be coming very soon
giles
|
11190
posts
|
PythonAnywhere staff
|
Aug. 30, 2017, 12:27 p.m.
|
permalink
Я получаю что-то вроде этого. Может кто-нибудь, пожалуйста, скажите мне, как это исправить.
C:UserskrushDocumentsML using Python>pip install pocketsphinx
Collecting pocketsphinx
Using cached pocketsphinx-0.1.3.zip
Building wheels for collected packages: pocketsphinx
Running setup.py bdist_wheel for pocketsphinx: started
Running setup.py bdist_wheel for pocketsphinx: finished with status 'error'
Complete output from command C:UserskrushAnaconda3python.exe -u -c "import setuptools, tokenize;__file__='C:\Users\krush\AppData\Local\Temp\pip-build-cns2i_wb\pocketsphinx\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:UserskrushAppDataLocalTemptmp3tyvnl9wpip-wheel- --python-tag cp36:
running bdist_wheel
running build_ext
building 'sphinxbase._ad' extension
swigging swig/sphinxbase/ad.i to swig/sphinxbase/ad_wrap.c
swig.exe -python -modern -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/win32 -Ideps/sphinxbase/swig -outdir sphinxbase -o swig/sphinxbase/ad_wrap.c swig/sphinxbase/ad.i
error: command 'swig.exe' failed: No such file or directory
----------------------------------------
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: started
Running setup.py install for pocketsphinx: finished with status 'error'
Complete output from command C:UserskrushAnaconda3python.exe -u -c "import setuptools, tokenize;__file__='C:\Users\krush\AppData\Local\Temp\pip-build-cns2i_wb\pocketsphinx\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:UserskrushAppDataLocalTemppip-x5mxeczy-recordinstall-record.txt --single-version-externally-managed --compile:
running install
running build_ext
building 'sphinxbase._ad' extension
swigging swig/sphinxbase/ad.i to swig/sphinxbase/ad_wrap.c
swig.exe -python -modern -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/win32 -Ideps/sphinxbase/swig -outdir sphinxbase -o swig/sphinxbase/ad_wrap.c swig/sphinxbase/ad.i
error: command 'swig.exe' failed: No such file or directory
----------------------------------------
Command "C:UserskrushAnaconda3python.exe -u -c "import setuptools, tokenize;__file__='C:\Users\krush\AppData\Local\Temp\pip-build-cns2i_wb\pocketsphinx\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:UserskrushAppDataLocalTemppip-x5mxeczy-recordinstall-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:UserskrushAppDataLocalTemppip-build-cns2i_wbpocketsphinx
5 ответов
Лучший ответ
Чтобы решить эту проблему, я загрузил глоток для окон
-
Скопируйте файл swig.exe в папку установки Python (например, C: / python27)
-
Откройте папку swigwin-3.0.12 / Lib и скопируйте все файлы * .swg в C: / python27 / lib или эквивалентный путь к python
-
Откройте swigwin-3.0.12 / lib / python и скопируйте все файлы в (C: / python27 / lib)
(Также убедитесь, что у вас установлен компилятор Microsoft Visual C ++ для Python)
Эти шаги сработали для меня.
13
Pang
15 Янв 2019 в 01:00
conda install swig
pip install pocketsphinx
Я не хотел делать всю эту настройку, которую предлагают другие люди, поэтому я попробовал это, и это сработало. Это, вероятно, работает, только если вы используете Anaconada.
6
Jaideep Heer
28 Сен 2019 в 08:16
Вы пытаетесь установить pocketsphinx
с pip
, который загрузит и скомпилирует этот модуль. Требуется некоторый инструмент компиляции, такой как swig
.
Другое решение — установить двоичную версию pocketsphinx
. Вы можете загрузить двоичную версию здесь. Вы должны выбрать правильную версию относительно вашей установки.
Чтобы определить, какую из них вы хотите загрузить, вы можете выполнить следующие команды, которые сообщат вам, какая версия вам нужна, и используете ли вы 32- или 64-битный интерпретатор Python.
"C:UserskrushAnaconda3python.exe" --version
"C:UserskrushAnaconda3python.exe" -c "import struct;print(struct.calcsize('P') * 8)"
Ниже приведены некоторые команды, которые вы можете ввести после загрузки правильной версии.
"C:UserskrushAnaconda3python.exe" -m pip install pocketsphinx‑0.1.3‑cp35‑cp35m‑win32.whl
"C:UserskrushAnaconda3python.exe" -m pip install pocketsphinx‑0.1.3‑cp36‑cp36m‑win_amd64.whl
9
Guillaume Jacquenot
12 Июн 2017 в 19:23
Я также получал ту же ошибку, при установке в Ubuntu 16.04 я выполнил следующие команды:
sudo apt-get install -y python python-dev python-pip build-essential swig git libpulse-dev
sudo pip install pocketsphinx
Источник: pocketsphinx-python
2
Ramesh Kumar
12 Сен 2018 в 11:33
Существует несколько наборов команд для решения этой проблемы. Просто выполните их:
sudo apt-get install -y python3 python3-dev python3-pip build-essential swig git libpulse-dev
sudo apt-get install libasound2-dev
sudo pip install pocketsphinx
0
Nitish nagar
29 Апр 2019 в 07:19
(Macosx) Я пытался установить textract с помощью pip install textract, но получаю следующее сообщение об ошибке. Я уже установил pocketsphinx и swig. Я тоже не знаю, что за сообщение про requests 2.18.4 has requirement chardet<3.1.0,>=3.0.2, but you’ll have chardet 2.3.0 which is incompatabile
Я был бы очень признателен, если бы кто-нибудь объяснил мне, что это значит и как я могу перейти к установке textract. относительно новичок в Python, поэтому чем проще язык, тем лучше.
Вот что я считал соответствующим сообщением об ошибке:
Failed building wheel for pocketsphinx
Running setup.py clean for pocketsphinx
Failed to build pocketsphinx
requests 2.18.4 has requirement chardet<3.1.0,>=3.0.2, but you'll have chardet 2.3.0 which is incompatible.
Installing collected packages: pocketsphinx, textract
Found existing installation: pocketsphinx 0.1.15
Uninstalling pocketsphinx-0.1.15:
Successfully uninstalled pocketsphinx-0.1.15
Running setup.py install for pocketsphinx ... error
Complete output from command /anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/d8/hyzy1y7s4sd46jxz4chrhfcc0000gn/T/pip-install-dn569xpj/pocketsphinx/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/d8/hyzy1y7s4sd46jxz4chrhfcc0000gn/T/pip-record-j1sxbma0/install-record.txt --single-version-externally-managed --compile:
running install
running build_ext
building 'sphinxbase._ad' extension
swigging swig/sphinxbase/ad.i to swig/sphinxbase/ad_wrap.c
swig -python -modern -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -I/System/Library/Frameworks/OpenAL.framework/Versions/A/Headers -Ideps/sphinxbase/include/android -Ideps/sphinxbase/swig -outdir sphinxbase -o swig/sphinxbase/ad_wrap.c swig/sphinxbase/ad.i
dyld: Library not loaded: @rpath/libpcre.1.dylib
Referenced from: /usr/local/bin/swig
Reason: image not found
error: command 'swig' terminated by signal 6