this weekend our docker image broke because it cannot be build anymore. While looking into the stats, I saw this line:
crypt_blowfish-1.2/crypt.h:17:23: fatal error: gnu-crypt.h: No such file or directory
In more detail:
Running setup.py bdist_wheel for cryptacular: started
Running setup.py bdist_wheel for cryptacular: finished with status 'error'
Complete output from command /usr/local/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-sayd65k0/cryptacular/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 /tmp/tmp5734bf55pip-wheel- --python-tag cp36:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/cryptacular
copying cryptacular/__init__.py -> build/lib.linux-x86_64-3.6/cryptacular
creating build/lib.linux-x86_64-3.6/cryptacular/crypt
copying cryptacular/crypt/test_crypt.py -> build/lib.linux-x86_64-3.6/cryptacular/crypt
copying cryptacular/crypt/__init__.py -> build/lib.linux-x86_64-3.6/cryptacular/crypt
creating build/lib.linux-x86_64-3.6/cryptacular/bcrypt
copying cryptacular/bcrypt/test_bcrypt.py -> build/lib.linux-x86_64-3.6/cryptacular/bcrypt
copying cryptacular/bcrypt/__init__.py -> build/lib.linux-x86_64-3.6/cryptacular/bcrypt
creating build/lib.linux-x86_64-3.6/cryptacular/core
copying cryptacular/core/test_core.py -> build/lib.linux-x86_64-3.6/cryptacular/core
copying cryptacular/core/__init__.py -> build/lib.linux-x86_64-3.6/cryptacular/core
creating build/lib.linux-x86_64-3.6/cryptacular/pbkdf2
copying cryptacular/pbkdf2/test_pbkdf2.py -> build/lib.linux-x86_64-3.6/cryptacular/pbkdf2
copying cryptacular/pbkdf2/__init__.py -> build/lib.linux-x86_64-3.6/cryptacular/pbkdf2
running egg_info
writing cryptacular.egg-info/PKG-INFO
writing dependency_links to cryptacular.egg-info/dependency_links.txt
writing namespace_packages to cryptacular.egg-info/namespace_packages.txt
writing requirements to cryptacular.egg-info/requires.txt
writing top-level names to cryptacular.egg-info/top_level.txt
reading manifest file 'cryptacular.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'cryptacular.egg-info/SOURCES.txt'
copying cryptacular/bcrypt/_bcrypt.c -> build/lib.linux-x86_64-3.6/cryptacular/bcrypt
running build_ext
building 'cryptacular.bcrypt._bcrypt' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/crypt_blowfish-1.2
creating build/temp.linux-x86_64-3.6/cryptacular
creating build/temp.linux-x86_64-3.6/cryptacular/bcrypt
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DNO_BF_ASM -Icrypt_blowfish-1.2/ -I/usr/local/include/python3.6m -c crypt_blowfish-1.2/crypt_blowfish.c -o build/temp.linux-x86_64-3.6/crypt_blowfish-1.2/crypt_blowfish.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DNO_BF_ASM -Icrypt_blowfish-1.2/ -I/usr/local/include/python3.6m -c crypt_blowfish-1.2/crypt_gensalt.c -o build/temp.linux-x86_64-3.6/crypt_blowfish-1.2/crypt_gensalt.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DNO_BF_ASM -Icrypt_blowfish-1.2/ -I/usr/local/include/python3.6m -c crypt_blowfish-1.2/wrapper.c -o build/temp.linux-x86_64-3.6/crypt_blowfish-1.2/wrapper.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DNO_BF_ASM -Icrypt_blowfish-1.2/ -I/usr/local/include/python3.6m -c cryptacular/bcrypt/_bcrypt.c -o build/temp.linux-x86_64-3.6/cryptacular/bcrypt/_bcrypt.o
In file included from /usr/local/include/python3.6m/Python.h:39:0,
from cryptacular/bcrypt/_bcrypt.c:26:
crypt_blowfish-1.2/crypt.h:17:23: fatal error: gnu-crypt.h: No such file or directory
#include <gnu-crypt.h>
^
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Failed building wheel for cryptacular
Running setup.py clean for cryptacular
Our implementation works with the package cryptacular which uses bcrypt. None of the packages were updated last week and I dont know where to start.
As additional information, the error occurs in this block of our Dockerfile
RUN apt-get install -y build-essential libfontconfig && \
pip install -q -U pip && \
pip install -q -r requirements.txt && \
apt-get remove -y --purge build-essential && \
apt-get autoremove -y && \
apt-get clean -y
where the requirements.txt uses cryptacular==1.4.1
Edit: We are working with the python:3.6-slim image
I had the same issue running python 3.6.6. With this one liner I was able to install cryptacular from the latest commit.
pipenv install -e hg+https://bitbucket.org/dholth/cryptacular#cb96fb3#egg=cryptacular
You will need to have mercurial installed
apt-get update && apt-get install -y mercurial
More info on this thread
We don't know the error exactly, but last weekend there was an security update in the base image. Therefore we pinned our python image to 3.6.4.
I was able to install using a virtualenv with python 2.7.14, installed via venv
(test) rodrigo#trujillo:/tmp/test $ python --version
Python 2.7.14
(test) rodrigo#trujillo:/tmp/test $ pip --version
pip 10.0.1 from /tmp/test/lib/python2.7/site-packages/pip (python 2.7)
(test) rodrigo#trujillo:/tmp/test $ pip install cryptacular
Collecting cryptacular
Using cached https://files.pythonhosted.org/packages/73/bd/714b3fbfb3392d6b4e658638d9b74f77ce1072725209c08a6becd90836a7/cryptacular-1.4.1.tar.gz
Collecting pbkdf2 (from cryptacular)
Requirement already satisfied: setuptools in ./lib/python2.7/site-packages (from cryptacular) (39.2.0)
Building wheels for collected packages: cryptacular
Running setup.py bdist_wheel for cryptacular ... done
Stored in directory: /home/rodrigo/.cache/pip/wheels/05/cd/1f/64fb0fb06f2735e2ca898935061275465573db7f4f98fa1db4
Successfully built cryptacular
Installing collected packages: pbkdf2, cryptacular
Successfully installed cryptacular-1.4.1 pbkdf2-1.3
(test) rodrigo#trujillo:/tmp/test $ pip list
Package Version
------------- -------
cryptacular 1.4.1
pbkdf2 1.3
pip 10.0.1
pkg-resources 0.0.0
setuptools 39.2.0
wheel 0.31.1
My problem solved by install cryptacular before install apex
Reference: https://github.com/NVIDIA/apex/issues/170#issuecomment-477321199
On Gentoo:
pip3 install -e hg+https://bitbucket.org/dholth/cryptacular#cb96fb3#egg=cryptacular --user
--user flag is required and I didn't have pipenv.
Version:
pip 20.0.2 from /usr/lib/python3.7/site-packages/pip (python 3.7)
Related
I'm building a docker image for python code that must connect with a remote MariaDB server. I was able to run this locally after some trial and error, but to make the installation on a remote (virtual) server easier, I really would like the solution to work too with a docker image.
As soon as I use an older alpine version < 3.11, using a lower version results in compatibility issue:
MariaDB Connector/Python requires MariaDB Connector/C >= 3.1.5, found version 3.0.10
Different python versions also doesn't seem to work.
My Dockerfile:
FROM python:3.6-alpine
RUN apk add --no-cache mariadb-dev build-base
RUN pip install mariadb
Console output:
> docker build . -t dockerpython
Sending build context to Docker daemon 137.5MB
Step 1/7 : FROM python:3.6-alpine3.12
3.6-alpine3.12: Pulling from library/python
Digest: sha256:c228fcf0064d5595b4c7aab92b68598917383fe066dc5e17d2e426b0395c7848
Status: Downloaded newer image for python:3.6-alpine3.12
---> 176f50d88b04
Step 2/7 : RUN apk add --no-cache mariadb-dev build-base
---> Using cache
---> afd8f9e92e7f
Step 3/7 : RUN pip install mariadb
---> Running in 887a7e3ea2f2
Collecting mariadb
Downloading mariadb-1.0.3.tar.gz (66 kB)
Building wheels for collected packages: mariadb
Building wheel for mariadb (setup.py): started
Building wheel for mariadb (setup.py): finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-x63w3ma6/mariadb/setup.py'"'"'; __file__='"'"'/tmp/pip-install-x63w3ma6/mariadb/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 /tmp/pip-wheel-kxbxgt6f
cwd: /tmp/pip-install-x63w3ma6/mariadb/
Complete output (29 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/mariadb
copying mariadb/__init__.py -> build/lib.linux-x86_64-3.6/mariadb
creating build/lib.linux-x86_64-3.6/mariadb/constants
copying mariadb/constants/__init__.py -> build/lib.linux-x86_64-3.6/mariadb/constants
copying mariadb/constants/CLIENT.py -> build/lib.linux-x86_64-3.6/mariadb/constants
copying mariadb/constants/INDICATOR.py -> build/lib.linux-x86_64-3.6/mariadb/constants
copying mariadb/constants/CURSOR.py -> build/lib.linux-x86_64-3.6/mariadb/constants
copying mariadb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-3.6/mariadb/constants
running build_ext
building 'mariadb._mariadb' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/mariadb
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -DPY_MARIADB_MAJOR_VERSION=1 -DPY_MARIADB_MINOR_VERSION=0 -DPY_MARIADB_PATCH_VERSION=3 -I/usr/include/mysql -I/usr/include/mysql/mysql -I./include -I/usr/local/include/python3.6m -c mariadb/mariadb.c -o build/temp.linux-x86_64-3.6/mariadb/mariadb.o -DDEFAULT_PLUGINS_SUBDIR="/usr/lib/mariadb/plugin"
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -DPY_MARIADB_MAJOR_VERSION=1 -DPY_MARIADB_MINOR_VERSION=0 -DPY_MARIADB_PATCH_VERSION=3 -I/usr/include/mysql -I/usr/include/mysql/mysql -I./include -I/usr/local/include/python3.6m -c mariadb/mariadb_connection.c -o build/temp.linux-x86_64-3.6/mariadb/mariadb_connection.o -DDEFAULT_PLUGINS_SUBDIR="/usr/lib/mariadb/plugin"
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -DPY_MARIADB_MAJOR_VERSION=1 -DPY_MARIADB_MINOR_VERSION=0 -DPY_MARIADB_PATCH_VERSION=3 -I/usr/include/mysql -I/usr/include/mysql/mysql -I./include -I/usr/local/include/python3.6m -c mariadb/mariadb_exception.c -o build/temp.linux-x86_64-3.6/mariadb/mariadb_exception.o -DDEFAULT_PLUGINS_SUBDIR="/usr/lib/mariadb/plugin"
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -DPY_MARIADB_MAJOR_VERSION=1 -DPY_MARIADB_MINOR_VERSION=0 -DPY_MARIADB_PATCH_VERSION=3 -I/usr/include/mysql -I/usr/include/mysql/mysql -I./include -I/usr/local/include/python3.6m -c mariadb/mariadb_cursor.c -o build/temp.linux-x86_64-3.6/mariadb/mariadb_cursor.o -DDEFAULT_PLUGINS_SUBDIR="/usr/lib/mariadb/plugin"
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -DPY_MARIADB_MAJOR_VERSION=1 -DPY_MARIADB_MINOR_VERSION=0 -DPY_MARIADB_PATCH_VERSION=3 -I/usr/include/mysql -I/usr/include/mysql/mysql -I./include -I/usr/local/include/python3.6m -c mariadb/mariadb_codecs.c -o build/temp.linux-x86_64-3.6/mariadb/mariadb_codecs.o -DDEFAULT_PLUGINS_SUBDIR="/usr/lib/mariadb/plugin"
mariadb/mariadb_codecs.c: In function 'my_strtoull':
mariadb/mariadb_codecs.c:148:15: error: 'ULONG_LONG_MAX' undeclared (first use in this function); did you mean 'ULLONG_MAX'?
148 | if (val > ULONG_LONG_MAX /10 || val*10 > ULONG_LONG_MAX - (*p - '0'))
| ^~~~~~~~~~~~~~
| ULLONG_MAX
mariadb/mariadb_codecs.c:148:15: note: each undeclared identifier is reported only once for each function it appears in
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for mariadb
...
The command '/bin/sh -c pip install mariadb' returned a non-zero code: 1
I filed (and already fixed) that bug in MariaDB's ticket system
The fix will be available in MariaDB Connector/Python 1.0.4 (which will be likely available via pypi.org by end of this week).
As a workaround you can download latest version from github repository and build it manually, or you could try (I didn't test it)
export CFLAGS=-D_GNU_SOURCE=1
pip3 install mariadb
Before installing the mariadb you need to install a few dependencies.
MariaDB version 10.2 -- sudo apt-get install -y libmariadb-dev
MariaDB version 10.3 -- sudo apt-get install -y libmariadb-dev-compat
And rather than going with alpine or python base images, you can use debian:slim base image.
I've upgraded pip to 19.0.3. Then I removed pip==19.0.3 and reinstalled pip9.0.1. Now every time I try to install anything this message keeps coming up.
You are using pip version 9.0.1, however, version 19.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip'
command.
Please help me out.
Also i'm not able to install any more python packages.
pip install pyAudio
> Collecting pyAudio Using cached
> https://files.pythonhosted.org/packages/ab/42/b4f04721c5c5bfc196ce156b3c768998ef8c0ae3654ed29ea5020c749a6b/PyAudio-0.2.11.tar.gz
> Building wheels for collected packages: pyAudio Running setup.py
> bdist_wheel for pyAudio ... error Complete output from command
> /usr/bin/python -u -c "import setuptools,
> tokenize;__file__='/tmp/pip-build-sBep_e/pyAudio/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
> /tmp/tmpJr7LNvpip-wheel- --python-tag cp27: running bdist_wheel
> running build running build_py creating build creating
> build/lib.linux-x86_64-2.7 copying src/pyaudio.py ->
> build/lib.linux-x86_64-2.7 running build_ext building '_portaudio'
> extension creating build/temp.linux-x86_64-2.7 creating
> build/temp.linux-x86_64-2.7/src x86_64-linux-gnu-gcc -pthread
> -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-3hk45v/python2.7-2.7.15~rc1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c src/_portaudiomodule.c -o build/temp.linux-x86_64-2.7/src/_portaudiomodule.o
> src/_portaudiomodule.c:29:10: fatal error: portaudio.h: No such file
> or directory #include "portaudio.h"
> ^~~~~~~~~~~~~ compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
> ---------------------------------------- Failed building wheel for pyAudio Running setup.py clean for pyAudio Failed to build
> pyAudio Installing collected packages: pyAudio Running setup.py
> install for pyAudio ... error
> Complete output from command /usr/bin/python -u -c "import setuptools,
> tokenize;__file__='/tmp/pip-build-sBep_e/pyAudio/setup.py';f=getattr(tokenize,
> 'open', open)(__file__);code=f.read().replace('\r\n',
> '\n');f.close();exec(compile(code, __file__, 'exec'))" install
> --record /tmp/pip-72KZyy-record/install-record.txt --single-version-externally-managed --compile:
> running install
> running build
> running build_py
> creating build
> creating build/lib.linux-x86_64-2.7
> copying src/pyaudio.py -> build/lib.linux-x86_64-2.7
> running build_ext
> building '_portaudio' extension
> creating build/temp.linux-x86_64-2.7
> creating build/temp.linux-x86_64-2.7/src
> x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-3hk45v/python2.7-2.7.15~rc1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c src/_portaudiomodule.c -o build/temp.linux-x86_64-2.7/src/_portaudiomodule.o
> src/_portaudiomodule.c:29:10: fatal error: portaudio.h: No such file or directory
> #include "portaudio.h"
> ^~~~~~~~~~~~~
> compilation terminated.
> error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
>
> ---------------------------------------- Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-sBep_e/pyAudio/setup.py';f=getattr(tokenize,
> 'open', open)(__file__);code=f.read().replace('\r\n',
> '\n');f.close();exec(compile(code, __file__, 'exec'))" install
> --record /tmp/pip-72KZyy-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-sBep_e/pyAudio/ You are using pip version 9.0.1,
> however version 19.0.3 is available. You should consider upgrading via
> the 'pip install --upgrade pip' command.
Installing pydev solved 'x86_64-linux-gnu-gcc' error for me!
easy as:
sudo apt-get install python-dev
You may also need build-essential for similar issues,
sudo apt-get install build-essential
Hope this helps.
You need to install portaudio dev package:
Download binary files of portaudio from here
Extract it to somewhere
in terminal go to that directory (with cd /where/you/extract/those)
run this command there: ./configure
run this: make
and this one: sudo make install
now you can install portaudio with pip:
$ sudo pip install pyAudio
Installing collected packages: pyAudio
Running setup.py install for pyAudio ... done
Successfully installed pyAudio-0.2.11
Try this sudo apt-get install python-pyaudio.
Thhis should work!
The only thing you need to do is upgrading the pip utility to latest version by using one these commands
pip install pip setuptools -U
or
pip install --upgrade pip
Note: You may need to add 'sudo' as prefix, if you're working on system level python installation.
I have problem on PyAudio and PortAudio, i want to use speech_recognition so speech_recognition needs PyAudio module and i tried to install but its not working i search almost everything
And im using ParrotOS & Python 2.7.16.
So i tried that;
pip install install clang
apt-get install & apt-get update but thats doesnt work
When i write the console this code;
sudo pip install portaudio
or
sudo pip install PyAudio
its shows me this;
Collecting pyaudio
Using cached https://files.pythonhosted.org/packages/ab/42/b4f04721c5c5bfc196ce156b3c768998ef8c0ae3654ed29ea5020c749a6b/PyAudio-0.2.11.tar.gz
Building wheels for collected packages: pyaudio
Building wheel for pyaudio (setup.py) ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-934KKj/pyaudio/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 /tmp/pip-wheel-tVvPhL --python-tag cp27:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying src/pyaudio.py -> build/lib.linux-x86_64-2.7
running build_ext
building '_portaudio' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-UboFgi/python2.7-2.7.16~rc1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c src/_portaudiomodule.c -o build/temp.linux-x86_64-2.7/src/_portaudiomodule.o
src/_portaudiomodule.c:29:10: fatal error: portaudio.h: No such file or directory
#include "portaudio.h"
^~~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Failed building wheel for pyaudio
Running setup.py clean for pyaudio
Failed to build pyaudio
and more fail messages.
sudo apt-get install portaudio19-dev
pip install pyaudio
and later i install pyaudio :)
I'm trying to install the python package textract on (dockerized) Debian:
FROM python:2.7
RUN apt-get update
RUN apt-get -y upgrade
RUN apt-get -y install libevent-dev python-dev libxml2-dev libxslt1-dev antiword unrtf poppler-utils pstotext tesseract-ocr flac ffmpeg lame libmad0 libsox-fmt-mp3 sox libjpeg-dev swig
RUN pip install textract
But it fails on the last step pip install textract. Why? How to get around this issue? Below is the error:
Building wheels for collected packages: textract, python-pptx, docx2txt, xlrd, EbookLib, pocketsphinx
Running setup.py bdist_wheel for textract: started
Running setup.py bdist_wheel for textract: finished with status 'done'
Stored in directory: /root/.cache/pip/wheels/7b/88/ca/fe02cca616f52ba41e11ee9eff08ca0d8391f3df35e0ede5e2
Running setup.py bdist_wheel for python-pptx: started
Running setup.py bdist_wheel for python-pptx: finished with status 'done'
Stored in directory: /root/.cache/pip/wheels/14/50/ec/bf4ff7cedffcde6ef29d3154f758a5d65f40427f526cbdb1d5
Running setup.py bdist_wheel for docx2txt: started
Running setup.py bdist_wheel for docx2txt: finished with status 'done'
Stored in directory: /root/.cache/pip/wheels/a8/a1/2e/61cea06f166c6f6ac4df4d75a409328406bd0d2f8e007592f9
Running setup.py bdist_wheel for xlrd: started
Running setup.py bdist_wheel for xlrd: finished with status 'done'
Stored in directory: /root/.cache/pip/wheels/f7/2e/62/b4b26f9bc16968996a93dab7a1ec3cf9a1c8ca409114f4fefe
Running setup.py bdist_wheel for EbookLib: started
Running setup.py bdist_wheel for EbookLib: finished with status 'done'
Stored in directory: /root/.cache/pip/wheels/3a/b9/cb/834288199b3b3c6c08441d5780ce4a6cfc161d4c859f28a915
Running setup.py bdist_wheel for pocketsphinx: started
Running setup.py bdist_wheel for pocketsphinx: finished with status 'error'
Complete output from command /usr/local/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-rkBOkm/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 /tmp/pip-wheel-lmkSIP --python-tag cp27:
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-2.7
creating build/temp.linux-x86_64-2.7/swig
creating build/temp.linux-x86_64-2.7/swig/sphinxbase
creating build/temp.linux-x86_64-2.7/deps
creating build/temp.linux-x86_64-2.7/deps/sphinxbase
creating build/temp.linux-x86_64-2.7/deps/sphinxbase/src
creating build/temp.linux-x86_64-2.7/deps/sphinxbase/src/libsphinxad
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DSPHINX_DLL -DHAVE_CONFIG_H -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -I/usr/local/include/python2.7 -c swig/sphinxbase/ad_wrap.c -o build/temp.linux-x86_64-2.7/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
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DSPHINX_DLL -DHAVE_CONFIG_H -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -I/usr/local/include/python2.7 -c deps/sphinxbase/src/libsphinxad/ad_pulse.c -o build/temp.linux-x86_64-2.7/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 'gcc' failed with exit status 1
----------------------------------------
Failed building wheel for pocketsphinx
Running setup.py clean for pocketsphinx
Successfully built textract python-pptx docx2txt xlrd EbookLib
Failed to build pocketsphinx
requests 2.20.0 has requirement chardet<3.1.0,>=3.0.2, but you'll have chardet 2.3.0 which is incompatible.
Installing collected packages: argcomplete, chardet, Pillow, XlsxWriter, python-pptx, docx2txt, beautifulsoup4, xlrd, six, EbookLib, SpeechRecognition, pocketsphinx, textract
Found existing installation: chardet 3.0.4
Uninstalling chardet-3.0.4:
Successfully uninstalled chardet-3.0.4
Found existing installation: beautifulsoup4 4.6.3
Uninstalling beautifulsoup4-4.6.3:
Successfully uninstalled beautifulsoup4-4.6.3
Running setup.py install for pocketsphinx: started
Running setup.py install for pocketsphinx: finished with status 'error'
Complete output from command /usr/local/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-rkBOkm/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 /tmp/pip-record-MiPh8Y/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-2.7
creating build/temp.linux-x86_64-2.7/swig
creating build/temp.linux-x86_64-2.7/swig/sphinxbase
creating build/temp.linux-x86_64-2.7/deps
creating build/temp.linux-x86_64-2.7/deps/sphinxbase
creating build/temp.linux-x86_64-2.7/deps/sphinxbase/src
creating build/temp.linux-x86_64-2.7/deps/sphinxbase/src/libsphinxad
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DSPHINX_DLL -DHAVE_CONFIG_H -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -I/usr/local/include/python2.7 -c swig/sphinxbase/ad_wrap.c -o build/temp.linux-x86_64-2.7/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
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DSPHINX_DLL -DHAVE_CONFIG_H -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -I/usr/local/include/python2.7 -c deps/sphinxbase/src/libsphinxad/ad_pulse.c -o build/temp.linux-x86_64-2.7/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 'gcc' failed with exit status 1
----------------------------------------
Command "/usr/local/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-rkBOkm/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 /tmp/pip-record-MiPh8Y/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-rkBOkm/pocketsphinx/
ERROR: Service 'baleen' failed to build: The command '/bin/sh -c pip install textract' returned a non-zero code: 1
Solution:
Add RUN apt-get -y install libpulse-dev before pip installing textract.
It has clealy shows the error.
The chardet version-<3.1.0,>=3.0.2 is needed, but you have a older version<2.3.0>.
So you need uninstall your chardet
sudo pip list | grep chardet
then uninstall old version
sudo pip uninstall chardet
I'm trying to install the new Regex module
The readme.txt says:::
To build and install regex for your default Python run
python setup.py install
To install regex for a specific version run setup.py with that interpreter, e.g.
python3.1 setup.py install
I type in python setup.py install and get back /Library/Frameworks/Python.framework/Versions/7.3/Resources/Python.app/Contents/MacOS/Python: can't open file 'setup.py': [Errno 2] No such file or directory
I'm looking for the answer but people keep referring me to the Python docs and they are confusing.
I know it is really simple but I'm just not sure why it isn't working.
The implicit first step in these instructions is to download a tarball or zip file of regex, unpack it, go into that directory, and there run “python setup.py install”. See http://docs.python.org/2/install/index.html#the-new-standard-distutils
If you have pip installed, you can avoid these manual steps by running “pip install regex”.
It's Easy (On Mac):
Install easy_install
curl https://bootstrap.pypa.io/ez_setup.py -o - | sudo python
Install pip
sudo easy_install pip
Install regex module
pip install regex
On Ubuntu and Python3.5, I was having an issue where it wasn't compiling when I try to install regex with pip ( pip install regex) :
Building wheels for collected packages: regex
Running setup.py bdist_wheel for regex ... error
Complete output from command /var/www/envs/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-i08laat0/regex/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 /tmp/pip-wheel-xlh43fe_ --python-tag cp35:
/var/www/envs/lib/python3.5/site-packages/setuptools/dist.py:397: UserWarning: Normalizing '2018.02.21' to '2018.2.21'
normalized_version,
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.5
copying regex_3/regex.py -> build/lib.linux-x86_64-3.5
copying regex_3/_regex_core.py -> build/lib.linux-x86_64-3.5
copying regex_3/test_regex.py -> build/lib.linux-x86_64-3.5
running build_ext
building '_regex' extension
creating build/temp.linux-x86_64-3.5
creating build/temp.linux-x86_64-3.5/regex_3
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 -I/usr/include/python3.5m -I/var/www/envs/include/python3.5m -c regex_3/_regex.c -o build/temp.linux-x86_64-3.5/regex_3/_regex.o
regex_3/_regex.c:46:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Failed building wheel for regex
Running setup.py clean for regex
Failed to build regex
Solved that by installing python3-dev : sudo apt-get install python3-dev