Bonjour à tous,
J’ai configuré l’interpréteur utilisé par PyCharm pour que la version 3.5 de Python soit utilisée (donc interpréteur v3.5).
J’aimerais faire usage du package "textreact" (https://textract.readthedocs.io/en/stable/). Donc dans mon terminal, j’ai tapé sudo pip3 install textreact
mais j’obtiens cette erreur :
Collecting textreact Could not find a version that satisfies the requirement textreact (from versions: ) No matching distribution found for textreact
Du coup je vais dans PyCharm et je clique sur la bulle d’aide, afin que l’IDE installe lui-même le paquetage (on ne sait jamais) :
deps/sphinxbase/src/libsphinxad/ad_pulse.c:44:30: fatal error: pulse/pulseaudio.h: No such file or directory
Pourtant, pulseaudio
est bien installé dans mon `Ubuntu 16.04̀.
Voici l’erreur en entier, affichée par PyCharm :
Collecting textract Requirement already satisfied (use –upgrade to upgrade): xlrd==1.0.0 in /usr/local/lib/python3.5/dist-packages (from textract) Requirement already satisfied (use –upgrade to upgrade): beautifulsoup4==4.5.3 in /usr/local/lib/python3.5/dist-packages (from textract) Requirement already satisfied (use –upgrade to upgrade): chardet==2.3.0 in /usr/lib/python3/dist-packages (from textract) Requirement already satisfied (use –upgrade to upgrade): SpeechRecognition==3.6.3 in /usr/local/lib/python3.5/dist-packages (from textract) Requirement already satisfied (use –upgrade to upgrade): EbookLib==0.15 in /usr/local/lib/python3.5/dist-packages (from textract) Collecting pocketsphinx==0.1.3 (from textract) Using cached pocketsphinx-0.1.3.zip Requirement already satisfied (use –upgrade to upgrade): python-pptx==0.6.5 in /usr/local/lib/python3.5/dist-packages (from textract) Requirement already satisfied (use –upgrade to upgrade): docx2txt==0.6 in /usr/local/lib/python3.5/dist-packages (from textract) Requirement already satisfied (use –upgrade to upgrade): six==1.10.0 in /usr/lib/python3/dist-packages (from textract) Requirement already satisfied (use –upgrade to upgrade): argcomplete==1.8.2 in /usr/local/lib/python3.5/dist-packages (from textract) Requirement already satisfied (use –upgrade to upgrade): lxml in /usr/lib/python3/dist-packages (from EbookLib==0.15->textract) Requirement already satisfied (use –upgrade to upgrade): XlsxWriter>=0.5.7 in /usr/lib/python3/dist-packages (from python-pptx==0.6.5->textract) Requirement already satisfied (use –upgrade to upgrade): Pillow>=2.6.1 in /usr/lib/python3/dist-packages (from python-pptx==0.6.5->textract) 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 /usr/bin/python3.5 -u -c "import setuptools, tokenize;file=’/tmp/pycharm-packaging/pocketsphinx/setup.py’;exec(compile(getattr(tokenize, ’open’, open)(file).read().replace(’\r\n’, ’\n’), file, ’exec’))" bdist_wheel -d /tmp/tmpb8tl0pdspip-wheel- –python-tag cp35: 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.5 creating build/temp.linux-x86_64-3.5/swig creating build/temp.linux-x86_64-3.5/swig/sphinxbase creating build/temp.linux-x86_64-3.5/deps creating build/temp.linux-x86_64-3.5/deps/sphinxbase creating build/temp.linux-x86_64-3.5/deps/sphinxbase/src creating build/temp.linux-x86_64-3.5/deps/sphinxbase/src/libsphinxad x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -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 swig/sphinxbase/ad_wrap.c -o build/temp.linux-x86_64-3.5/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-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 compilation terminated. error: command ’x86_64-linux-gnu-gcc’ failed with exit status 1
Running setup.py clean for pocketsphinx
Failed to build pocketsphinx
Installing collected packages: pocketsphinx, textract
Running setup.py install for pocketsphinx: started
Running setup.py install for pocketsphinx: finished with status ’error’
Complete output from command /usr/bin/python3.5 -u -c "import setuptools, tokenize;file=’/tmp/pycharm-packaging/pocketsphinx/setup.py’;exec(compile(getattr(tokenize, ’open’, open)(file).read().replace(’\r\n’, ’\n’), file, ’exec’))" install –record /tmp/pip-c1qspq20-record/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 -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.5
creating build/temp.linux-x86_64-3.5/swig
creating build/temp.linux-x86_64-3.5/swig/sphinxbase
creating build/temp.linux-x86_64-3.5/deps
creating build/temp.linux-x86_64-3.5/deps/sphinxbase
creating build/temp.linux-x86_64-3.5/deps/sphinxbase/src
creating build/temp.linux-x86_64-3.5/deps/sphinxbase/src/libsphinxad
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -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 swig/sphinxbase/ad_wrap.c -o build/temp.linux-x86_64-3.5/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-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
compilation terminated.
error: command ’x86_64-linux-gnu-gcc’ failed with exit status 1
----------------------------------------
Failed building wheel for pocketsphinx Command "/usr/bin/python3.5 -u -c "import setuptools, tokenize;file=’/tmp/pycharm-packaging/pocketsphinx/setup.py’;exec(compile(getattr(tokenize, ’open’, open)(file).read().replace(’\r\n’, ’\n’), file, ’exec’))" install –record /tmp/pip-c1qspq20-record/install-record.txt –single-version-externally-managed –compile" failed with error code 1 in /tmp/pycharm-packaging/pocketsphinx/ You are using pip version 8.1.1, however version 9.0.1 is available. You should consider upgrading via the ’pip install –upgrade pip’ command.
Donc voilà pour le moment je ne peux plus continuer mon programme Python parce que je n’arrive pas à installer ce package textreact
, c’est assez embarassant…
Quelqu’un a-t-il réussi à utiliser ce paquetage sous Ubuntu >16 svp ?
Merci d’avance les citrons mandarines les clémentines !