How to install polyglot on Raspberry Pi? - problems with compatibility - python
I want to install this on my Raspberry Pi 2 (Raspbian):
http://polyglot.readthedocs.org/en/latest/Installation.html
Unfortunately, when I did sudo pip install polyglot I got the following error:
pi#raspberrypi:~ $ sudo pip install -U git+https://github.com/aboSamoor/polyglot.git#master
Downloading/unpacking git+https://github.com/aboSamoor/polyglot.git#master
Cloning https://github.com/aboSamoor/polyglot.git (to master) to /tmp/pip-97dbqD-build
Running setup.py (path:/tmp/pip-97dbqD-build/setup.py) egg_info for package from git+https://github.com/aboSamoor/polyglot.git#master
warning: no previously-included files matching '__pycache__' found under directory '*'
warning: no previously-included files matching '*.py[co]' found under directory '*'
Downloading/unpacking futures>=2.1.6 (from polyglot==15.10.03)
Downloading futures-3.0.5-py2-none-any.whl
Downloading/unpacking PyICU>=1.8 (from polyglot==15.10.03)
Downloading PyICU-1.9.2.tar.gz (175kB): 175kB downloaded
Running setup.py (path:/tmp/pip-build-FkLuG4/PyICU/setup.py) egg_info for package PyICU
Downloading/unpacking pycld2>=0.3 (from polyglot==15.10.03)
Downloading pycld2-0.31.tar.gz (14.3MB): 14.3MB downloaded
Running setup.py (path:/tmp/pip-build-FkLuG4/pycld2/setup.py) egg_info for package pycld2
Requirement already up-to-date: morfessor>=2.0.2a1 in /usr/local/lib/python2.7/dist-packages/Morfessor-2.0.2alpha3-py2.7.egg (from polyglot==15.10.03)
Downloading/unpacking six>=1.7.3 from https://pypi.python.org/packages/py2.py3/s/six/six-1.10.0-py2.py3-none-any.whl#md5=3ab558cf5d4f7a72611d59a81a315dc8 (from polyglot==15.10.03)
Downloading six-1.10.0-py2.py3-none-any.whl
Downloading/unpacking wheel>=0.23.0 from https://pypi.python.org/packages/py2.py3/w/wheel/wheel-0.29.0-py2.py3-none-any.whl#md5=d7db45db5c131af262b8ffccde46a88a (from polyglot==15.10.03)
Downloading wheel-0.29.0-py2.py3-none-any.whl (66kB): 66kB downloaded
Installing collected packages: futures, PyICU, pycld2, six, wheel, polyglot
Running setup.py install for PyICU
building '_icu' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c dateformat.cpp -o build/temp.linux-armv7l-2.7/dateformat.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from dateformat.cpp:24:0:
common.h:33:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-FkLuG4/PyICU/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-kNR6VT-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-armv7l-2.7
copying icu.py -> build/lib.linux-armv7l-2.7
copying PyICU.py -> build/lib.linux-armv7l-2.7
copying docs.py -> build/lib.linux-armv7l-2.7
running build_ext
building '_icu' extension
creating build/temp.linux-armv7l-2.7
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c dateformat.cpp -o build/temp.linux-armv7l-2.7/dateformat.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from dateformat.cpp:24:0:
common.h:33:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-FkLuG4/PyICU/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-kNR6VT-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-FkLuG4/PyICU
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in <module>
load_entry_point('pip==1.5.6', 'console_scripts', 'pip')()
File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 248, in main
return command.main(cmd_args)
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 161, in main
text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 42: ordinal not in range(128)
I believe this is a problem with PYCLD2? It is for 64bit system?
How to solve this problem?
#edit
After executing: sudo apt-get install python-dev
I got:
pi#raspberrypi:~ $ sudo pip install polyglot
Requirement already satisfied (use --upgrade to upgrade): polyglot in /usr/local/lib/python2.7/dist-packages/polyglot-15.10.03-py2.7.egg
Requirement already satisfied (use --upgrade to upgrade): futures>=2.1.6 in /usr/local/lib/python2.7/dist-packages (from polyglot)
Downloading/unpacking PyICU>=1.8 (from polyglot)
Downloading PyICU-1.9.2.tar.gz (175kB): 175kB downloaded
Running setup.py (path:/tmp/pip-build-y6_Rht/PyICU/setup.py) egg_info for package PyICU
Downloading/unpacking pycld2>=0.3 (from polyglot)
Downloading pycld2-0.31.tar.gz (14.3MB): 14.3MB downloaded
Running setup.py (path:/tmp/pip-build-y6_Rht/pycld2/setup.py) egg_info for package pycld2
Requirement already satisfied (use --upgrade to upgrade): morfessor>=2.0.2a1 in /usr/local/lib/python2.7/dist-packages/Morfessor-2.0.2alpha3-py2.7.egg (from polyglot)
Requirement already satisfied (use --upgrade to upgrade): six>=1.7.3 in /usr/lib/python2.7/dist-packages (from polyglot)
Requirement already satisfied (use --upgrade to upgrade): wheel>=0.23.0 in /usr/lib/python2.7/dist-packages (from polyglot)
Installing collected packages: PyICU, pycld2
Running setup.py install for PyICU
building '_icu' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c dateformat.cpp -o build/temp.linux-armv7l-2.7/dateformat.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c char.cpp -o build/temp.linux-armv7l-2.7/char.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c errors.cpp -o build/temp.linux-armv7l-2.7/errors.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c numberformat.cpp -o build/temp.linux-armv7l-2.7/numberformat.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c charset.cpp -o build/temp.linux-armv7l-2.7/charset.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c normalizer.cpp -o build/temp.linux-armv7l-2.7/normalizer.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c transliterator.cpp -o build/temp.linux-armv7l-2.7/transliterator.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c unicodeset.cpp -o build/temp.linux-armv7l-2.7/unicodeset.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c shape.cpp -o build/temp.linux-armv7l-2.7/shape.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c collator.cpp -o build/temp.linux-armv7l-2.7/collator.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c _icu.cpp -o build/temp.linux-armv7l-2.7/_icu.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c iterators.cpp -o build/temp.linux-armv7l-2.7/iterators.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c tzinfo.cpp -o build/temp.linux-armv7l-2.7/tzinfo.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c search.cpp -o build/temp.linux-armv7l-2.7/search.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c layoutengine.cpp -o build/temp.linux-armv7l-2.7/layoutengine.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c calendar.cpp -o build/temp.linux-armv7l-2.7/calendar.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c idna.cpp -o build/temp.linux-armv7l-2.7/idna.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c spoof.cpp -o build/temp.linux-armv7l-2.7/spoof.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c common.cpp -o build/temp.linux-armv7l-2.7/common.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
common.cpp: In function ‘void _stopDecode(const void*, UConverterToUnicodeArgs*, const char*, int32_t, UConverterCallbackReason, UErrorCode*)’:
common.cpp:62:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
const int len = length < sizeof(stop->chars) - 1 ? length : sizeof(stop->chars) - 1;
^
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c format.cpp -o build/temp.linux-armv7l-2.7/format.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c regex.cpp -o build/temp.linux-armv7l-2.7/regex.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c locale.cpp -o build/temp.linux-armv7l-2.7/locale.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
locale.cpp: In function ‘int t_locale_init(t_locale*, PyObject*, PyObject*)’:
locale.cpp:323:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (len < sizeof(code))
^
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c bases.cpp -o build/temp.linux-armv7l-2.7/bases.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c script.cpp -o build/temp.linux-armv7l-2.7/script.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
c++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-armv7l-2.7/dateformat.o build/temp.linux-armv7l-2.7/char.o build/temp.linux-armv7l-2.7/errors.o build/temp.linux-armv7l-2.7/numberformat.o build/temp.linux-armv7l-2.7/charset.o build/temp.linux-armv7l-2.7/normalizer.o build/temp.linux-armv7l-2.7/transliterator.o build/temp.linux-armv7l-2.7/unicodeset.o build/temp.linux-armv7l-2.7/shape.o build/temp.linux-armv7l-2.7/collator.o build/temp.linux-armv7l-2.7/_icu.o build/temp.linux-armv7l-2.7/iterators.o build/temp.linux-armv7l-2.7/tzinfo.o build/temp.linux-armv7l-2.7/search.o build/temp.linux-armv7l-2.7/layoutengine.o build/temp.linux-armv7l-2.7/calendar.o build/temp.linux-armv7l-2.7/idna.o build/temp.linux-armv7l-2.7/spoof.o build/temp.linux-armv7l-2.7/common.o build/temp.linux-armv7l-2.7/format.o build/temp.linux-armv7l-2.7/regex.o build/temp.linux-armv7l-2.7/locale.o build/temp.linux-armv7l-2.7/bases.o build/temp.linux-armv7l-2.7/script.o -licui18n -licuuc -licudata -licule -o build/lib.linux-armv7l-2.7/_icu.so
Running setup.py install for pycld2
building 'pycld2._pycld2' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Icld2/internal -Icld2/public -I/usr/include/python2.7 -c cld2/internal/cldutil.cc -o build/temp.linux-armv7l-2.7/cld2/internal/cldutil.o -w -O2 -m64 -fPIC
arm-linux-gnueabihf-gcc: error: unrecognized command line option ‘-m64’
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-y6_Rht/pycld2/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-pSIInS-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-armv7l-2.7
creating build/lib.linux-armv7l-2.7/pycld2
copying pycld2/__init__.py -> build/lib.linux-armv7l-2.7/pycld2
running build_ext
building 'pycld2._pycld2' extension
creating build/temp.linux-armv7l-2.7
creating build/temp.linux-armv7l-2.7/cld2
creating build/temp.linux-armv7l-2.7/cld2/internal
creating build/temp.linux-armv7l-2.7/bindings
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Icld2/internal -Icld2/public -I/usr/include/python2.7 -c cld2/internal/cldutil.cc -o build/temp.linux-armv7l-2.7/cld2/internal/cldutil.o -w -O2 -m64 -fPIC
arm-linux-gnueabihf-gcc: error: unrecognized command line option ‘-m64’
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-y6_Rht/pycld2/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-pSIInS-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-y6_Rht/pycld2
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in <module>
load_entry_point('pip==1.5.6', 'console_scripts', 'pip')()
File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 248, in main
return command.main(cmd_args)
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 161, in main
text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 42: ordinal not in range(128)
I managed to solve this problem.
First you need to do is to download polyglot's source code:
git clone https://github.com/aboSamoor/polyglot
Then edit setup.py:
nano polyglot/pycld2/setup.py
Change this line:
extra_compile_args=['-w', '-O2', '-m64', '-fPIC'],
to:
extra_compile_args=['-w', '-O2', '-fPIC'],
Install PYCLD2:
sudo ./setup.py install
Install polyglot:
cd ..
sudo ./setup.py install
Related
Dependencies issue building a Dockerfile
I have been trying to build a Dockerfile from github but when i build it i got the following errors: Building wheels for collected packages: subprocess32, sqlalchemy, scandir Building wheel for subprocess32 (setup.py): started Building wheel for subprocess32 (setup.py): finished with status 'done' Created wheel for subprocess32: filename=subprocess32-3.5.4-cp27-cp27mu-linux_x86_64.whl size=47608 sha256=fe35748bdc27c9d9c269fb1d612dd73cdfe617d4e2cd8cf80587d828df9bd297 Stored in directory: /root/.cache/pip/wheels/e3/c7/6a/434fc8f2936acc4964ded8478435a8ef7c69eb41df7007a49f Building wheel for sqlalchemy (setup.py): started Building wheel for sqlalchemy (setup.py): finished with status 'error' ERROR: Command errored out with exit status 1: command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-rx01B5/sqlalchemy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-rx01B5/sqlalchemy/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-JdSdpB cwd: /tmp/pip-install-rx01B5/sqlalchemy/ Complete output (547 lines): running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-2.7 creating build/lib.linux-x86_64-2.7/sqlalchemy copying lib/sqlalchemy/inspection.py -> build/lib.linux-x86_64-2.7/sqlalchemy . . . . . running build_ext building 'sqlalchemy.cprocessors' extension creating build/temp.linux-x86_64-2.7 creating build/temp.linux-x86_64-2.7/lib creating build/temp.linux-x86_64-2.7/lib/sqlalchemy creating build/temp.linux-x86_64-2.7/lib/sqlalchemy/cextension i686-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-2KjtLn/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c lib/sqlalchemy/cextension/processors.c -o build/temp.linux-x86_64-2.7/lib/sqlalchemy/cextension/processors.o -Wundef -Werror=implicit-function-declaration i686-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-2KjtLn/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-2KjtLn/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/lib/sqlalchemy/cextension/processors.o -o build/lib.linux-x86_64-2.7/sqlalchemy/cprocessors.so building 'sqlalchemy.cresultproxy' extension i686-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-2KjtLn/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c lib/sqlalchemy/cextension/resultproxy.c -o build/temp.linux-x86_64-2.7/lib/sqlalchemy/cextension/resultproxy.o -Wundef -Werror=implicit-function-declaration i686-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-2KjtLn/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-2KjtLn/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/lib/sqlalchemy/cextension/resultproxy.o -o build/lib.linux-x86_64-2.7/sqlalchemy/cresultproxy.so building 'sqlalchemy.cimmutabledict' extension i686-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-2KjtLn/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c lib/sqlalchemy/cextension/immutabledict.c -o build/temp.linux-x86_64-2.7/lib/sqlalchemy/cextension/immutabledict.o -Wundef -Werror=implicit-function-declaration i686-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-2KjtLn/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-2KjtLn/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/lib/sqlalchemy/cextension/immutabledict.o -o build/lib.linux-x86_64-2.7/sqlalchemy/cimmutabledict.so installing to build/bdist.linux-x86_64/wheel running install running install_lib creating build/bdist.linux-x86_64 creating build/bdist.linux-x86_64/wheel creating build/bdist.linux-x86_64/wheel/sqlalchemy creating build/bdist.linux-x86_64/wheel/sqlalchemy/engine copying build/lib.linux-x86_64-2.7/sqlalchemy/engine/interfaces.py -> build/bdist.linux-x86_64/wheel/sqlalchemy/engine . . . . . running install_egg_info error: 'egg_base' must be a directory name (got `lib`) ---------------------------------------- ERROR: Failed building wheel for sqlalchemy Running setup.py clean for sqlalchemy Building wheel for scandir (setup.py): started Building wheel for scandir (setup.py): finished with status 'done' Created wheel for scandir: filename=scandir-1.10.0-cp27-cp27mu-linux_x86_64.whl size=40684 sha256=0ebd2cf5afe24d5a60d5cd5a6f62ead402fc8c29c3dd71abcdf1e4378ebc427c Stored in directory: /root/.cache/pip/wheels/58/2c/26/52406f7d1f19bcc47a6fbd1037a5f293492f5cf1d58c539edb Successfully built subprocess32 scandir Failed to build sqlalchemy Installing collected packages: subprocess32, lockfile, scandir, pathlib2, contextlib2, zipp, configparser, importlib-metadata, sqlalchemy Running setup.py install for sqlalchemy: started Running setup.py install for sqlalchemy: finished with status 'error' ERROR: Command errored out with exit status 1: command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-rx01B5/sqlalchemy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-rx01B5/sqlalchemy/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-ZJroJ3/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python2.7/sqlalchemy cwd: /tmp/pip-install-rx01B5/sqlalchemy/ Complete output (841 lines): running install running build running build_py creating build creating build/lib.linux-x86_64-2.7 creating build/lib.linux-x86_64-2.7/sqlalchemy copying lib/sqlalchemy/inspection.py -> build/lib.linux-x86_64-2.7/sqlalchemy . . . . running build_ext building 'sqlalchemy.cprocessors' extension creating build/temp.linux-x86_64-2.7 creating build/temp.linux-x86_64-2.7/lib creating build/temp.linux-x86_64-2.7/lib/sqlalchemy creating build/temp.linux-x86_64-2.7/lib/sqlalchemy/cextension i686-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-2KjtLn/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c lib/sqlalchemy/cextension/processors.c -o build/temp.linux-x86_64-2.7/lib/sqlalchemy/cextension/processors.o -Wundef -Werror=implicit-function-declaration i686-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-2KjtLn/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-2KjtLn/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/lib/sqlalchemy/cextension/processors.o -o build/lib.linux-x86_64-2.7/sqlalchemy/cprocessors.so building 'sqlalchemy.cresultproxy' extension i686-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-2KjtLn/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c lib/sqlalchemy/cextension/resultproxy.c -o build/temp.linux-x86_64-2.7/lib/sqlalchemy/cextension/resultproxy.o -Wundef -Werror=implicit-function-declaration i686-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-2KjtLn/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-2KjtLn/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/lib/sqlalchemy/cextension/resultproxy.o -o build/lib.linux-x86_64-2.7/sqlalchemy/cresultproxy.so building 'sqlalchemy.cimmutabledict' extension i686-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-2KjtLn/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c lib/sqlalchemy/cextension/immutabledict.c -o build/temp.linux-x86_64-2.7/lib/sqlalchemy/cextension/immutabledict.o -Wundef -Werror=implicit-function-declaration i686-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-2KjtLn/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-2KjtLn/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/lib/sqlalchemy/cextension/immutabledict.o -o build/lib.linux-x86_64-2.7/sqlalchemy/cimmutabledict.so running install_lib creating /usr/local/lib/python2.7/dist-packages/sqlalchemy creating /usr/local/lib/python2.7/dist-packages/sqlalchemy/engine copying build/lib.linux-x86_64-2.7/sqlalchemy/engine/interfaces.py -> /usr/local/lib/python2.7/dist-packages/sqlalchemy/engine . . . copying build/lib.linux-x86_64-2.7/sqlalchemy/schema.py -> /usr/local/lib/python2.7/dist-packages/sqlalchemy byte-compiling /usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/interfaces.py to interfaces.pyc . . . byte-compiling /usr/local/lib/python2.7/dist-packages/sqlalchemy/dialects/postgresql/asyncpg.py to asyncpg.pyc File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 372 async def _prepare_and_execute(self, operation, parameters): ^ SyntaxError: invalid syntax byte-compiling /usr/local/lib/python2.7/dist-packages/sqlalchemy/dialects/mysql/aiomysql.py to aiomysql.pyc File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/dialects/mysql/aiomysql.py", line 102 async def _execute_async(self, operation, parameters): ^ SyntaxError: invalid syntax byte-compiling /usr/local/lib/python2.7/dist-packages/sqlalchemy/util/_concurrency_py3k.py to _concurrency_py3k.pyc File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/_concurrency_py3k.py", line 46 def await_only(awaitable: Coroutine) -> Any: ^ SyntaxError: invalid syntax byte-compiling /usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/mypy/plugin.py to plugin.pyc File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/mypy/plugin.py", line 46 self, fullname: str ^ SyntaxError: invalid syntax byte-compiling /usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/mypy/apply.py to apply.pyc File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/mypy/apply.py", line 41 cls: ClassDef, ^ SyntaxError: invalid syntax byte-compiling /usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/mypy/__init__.py to __init__.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/mypy/infer.py to infer.pyc File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/mypy/infer.py", line 39 api: SemanticAnalyzerPluginInterface, ^ SyntaxError: invalid syntax byte-compiling /usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/mypy/util.py to util.pyc File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/mypy/util.py", line 41 is_mapped: bool, ^ SyntaxError: invalid syntax byte-compiling /usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/mypy/decl_class.py to decl_class.pyc File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/mypy/decl_class.py", line 46 cls: ClassDef, ^ SyntaxError: invalid syntax byte-compiling /usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/mypy/names.py to names.pyc File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/mypy/names.py", line 31 COLUMN: int = util.symbol("COLUMN") # type: ignore ^ SyntaxError: invalid syntax byte-compiling /usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/mutable.py to mutable.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/serializer.py to serializer.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/hybrid.py to hybrid.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/asyncio/engine.py to engine.pyc File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/asyncio/engine.py", line 98 async def start(self, is_ctxmanager=False): ^ SyntaxError: invalid syntax byte-compiling /usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/asyncio/__init__.py to __init__.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/asyncio/events.py to events.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/asyncio/base.py to base.pyc File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/asyncio/base.py", line 50 async def start(self, is_ctxmanager=False): ^ SyntaxError: invalid syntax byte-compiling /usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/asyncio/exc.py to exc.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/asyncio/session.py to session.pyc File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/asyncio/session.py", line 83 async def refresh( ^ SyntaxError: invalid syntax byte-compiling /usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/asyncio/result.py to result.pyc File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/asyncio/result.py", line 18 async def close(self): ^ SyntaxError: invalid syntax byte-compiling /usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/indexable.py to indexable.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/instrumentation.py to instrumentation.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/sqlalchemy/schema.py to schema.pyc running install_egg_info error: 'egg_base' must be a directory name (got `lib`) ---------------------------------------- ERROR: Command errored out with exit status 1: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-rx01B5/sqlalchemy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-rx01B5/sqlalchemy/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-ZJroJ3/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python2.7/sqlalchemy Check the logs for full command output. The command '/bin/sh -c pip install subprocess32 lockfile sqlalchemy -i https://pypi.python.org/simple' returned a non-zero code: 1 So i tried to install manually the following dependencies that are linked to a file on the github repository: SQLAlchemy==1.0.14 zmq==0.0.0 pyzmq==15.2.0 psycopg2==2.6.1 lockfile==0.10.2 tabulate==0.7.5 pexpect==3.2 psutil==5.6.6 ipython==2.3.0 colorama==0.3.2 numpy==1.8.2 argparse==1.2.1 subprocess32==3.2.6 But running the command $pip install psycopg2==2.6.1 i got: DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality. Defaulting to user installation because normal site-packages is not writeable Collecting psycopg2==2.6.1 Using cached psycopg2-2.6.1.tar.gz (371 kB) ERROR: Command errored out with exit status 1: command: /usr/bin/python2 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-S6dRnw/psycopg2/setup.py'"'"'; __file__='"'"'/tmp/pip-install-S6dRnw/psycopg2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-Mqd4AD cwd: /tmp/pip-install-S6dRnw/psycopg2/ Complete output (7 lines): running egg_info creating /tmp/pip-pip-egg-info-Mqd4AD/psycopg2.egg-info writing /tmp/pip-pip-egg-info-Mqd4AD/psycopg2.egg-info/PKG-INFO writing top-level names to /tmp/pip-pip-egg-info-Mqd4AD/psycopg2.egg-info/top_level.txt writing dependency_links to /tmp/pip-pip-egg-info-Mqd4AD/psycopg2.egg-info/dependency_links.txt writing manifest file '/tmp/pip-pip-egg-info-Mqd4AD/psycopg2.egg-info/SOURCES.txt' Error: could not determine PostgreSQL version from '12.7' ---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. It seems the psycopg2 complains about inability to determine PostgreSQL version. Looking at this https://github.com/psycopg/psycopg2/issues/594 The problem was fixed in #489 released in psycopg 2.7. We don't have plans to backport the fix to 2.6. Use a pg_config from a production version of Postgres not from 10 beta 4 I was wondering whether i can fix it or there is no way to do it. Furthermore i installed the latest version of the psycopg package and built the docker again but i always get the same issue mentioned above. Thank you.
pip3 install jupyterlab fail on WSL2.0 under windows 10 arm64
Ubuntu 20.04 on WSL 2.0 under windows 10 ARM64 (Surface Pro X with WSL2.0). pip3 install jupyterlab // failure Building wheels for collected packages: argon2-cffi Building wheel for argon2-cffi (PEP 517) ... error ERROR: Command errored out with exit status 1: command: /usr/bin/python3.8 /usr/local/lib/python3.8/dist-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmp5k32hshp cwd: /tmp/pip-install-jo5pljfy/argon2-cffi_f65af512bd344c9b956794545e86c839 Complete output (39 lines): running bdist_wheel running build running build_py creating build creating build/lib.linux-aarch64-3.8 creating build/lib.linux-aarch64-3.8/argon2 copying src/argon2/__main__.py -> build/lib.linux-aarch64-3.8/argon2 copying src/argon2/exceptions.py -> build/lib.linux-aarch64-3.8/argon2 copying src/argon2/_password_hasher.py -> build/lib.linux-aarch64-3.8/argon2 copying src/argon2/_ffi_build.py -> build/lib.linux-aarch64-3.8/argon2 copying src/argon2/low_level.py -> build/lib.linux-aarch64-3.8/argon2 copying src/argon2/_utils.py -> build/lib.linux-aarch64-3.8/argon2 copying src/argon2/_legacy.py -> build/lib.linux-aarch64-3.8/argon2 copying src/argon2/__init__.py -> build/lib.linux-aarch64-3.8/argon2 running build_clib building 'argon2' library creating build/temp.linux-aarch64-3.8 creating build/temp.linux-aarch64-3.8/extras creating build/temp.linux-aarch64-3.8/extras/libargon2 creating build/temp.linux-aarch64-3.8/extras/libargon2/src creating build/temp.linux-aarch64-3.8/extras/libargon2/src/blake2 aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iextras/libargon2/src/../include -Iextras/libargon2/src/blake2 -c extras/libargon2/src/argon2.c -o build/temp.linux-aarch64-3.8/extras/libargon2/src/argon2.o aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iextras/libargon2/src/../include -Iextras/libargon2/src/blake2 -c extras/libargon2/src/blake2/blake2b.c -o build/temp.linux-aarch64-3.8/extras/libargon2/src/blake2/blake2b.o aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iextras/libargon2/src/../include -Iextras/libargon2/src/blake2 -c extras/libargon2/src/core.c -o build/temp.linux-aarch64-3.8/extras/libargon2/src/core.o aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iextras/libargon2/src/../include -Iextras/libargon2/src/blake2 -c extras/libargon2/src/encoding.c -o build/temp.linux-aarch64-3.8/extras/libargon2/src/encoding.o aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iextras/libargon2/src/../include -Iextras/libargon2/src/blake2 -c extras/libargon2/src/ref.c -o build/temp.linux-aarch64-3.8/extras/libargon2/src/ref.o aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iextras/libargon2/src/../include -Iextras/libargon2/src/blake2 -c extras/libargon2/src/thread.c -o build/temp.linux-aarch64-3.8/extras/libargon2/src/thread.o aarch64-linux-gnu-gcc-ar rcs build/temp.linux-aarch64-3.8/libargon2.a build/temp.linux-aarch64-3.8/extras/libargon2/src/argon2.o build/temp.linux-aarch64-3.8/extras/libargon2/src/blake2/blake2b.o build/temp.linux-aarch64-3.8/extras/libargon2/src/core.o build/temp.linux-aarch64-3.8/extras/libargon2/src/encoding.o build/temp.linux-aar aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iextras/libargon2/include -I/usr/include/python3.8 -c build/temp.linux-aarch64-3.8/_ffi.c -o build/temp.linux-aarch64-3.8/build/temp.linux-aarch64-3.8/_ffi.o build/temp.linux-aarch64-3.8/_ffi.c:50:14: fatal error: pyconfig.h: No such file or directory 50 | # include <pyconfig.h> | ^~~~~~~~~~~~ compilation terminated. error: command 'aarch64-linux-gnu-gcc' failed with exit status 1 ---------------------------------------- ERROR: Failed building wheel for argon2-cffi Failed to build argon2-cffi ERROR: Could not build wheels for argon2-cffi which use PEP 517 and cannot be installed directly How can I build argon2-cffi successfully?
I solved it following these steps: sudo apt install -y build-essential python3.8-dev // ubuntu 20.04 pip3 install pep517 // or python3.8 -m pip install pep517 pip3 install jupyterlab // successfully
set compile flags when installing Python + C++ project
When pip-installing a Python project with C++ parts, pip3 install . --verbose --user the typical compile line will be something like x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/eigen3/ -I/usr/local/include/python3.7 -I/home/nschloe/.local/include/python3.7m -I/usr/include/python3.7m -c src/generate.cpp -o build/temp.linux-x86_64-3.7/src/generate.o Explicitly setting CFLAGS like OPT="" CFLAGS="" pip3 install . --verbose --user results in x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/eigen3/ -I/usr/local/include/python3.7 -I/home/nschloe/.local/include/python3.7m -I/usr/include/python3.7m -c src/generate.cpp -o build/temp.linux-x86_64-3.7/src/generate.o retaining most of the flags. Question: Where are all the compiler options set? More specifically: How can I remove -g? (It's eating too much memory.)
Cannot install mpi4py on CentOS 7
I have CentOS 7 and I have installed mpicc (it works and compiles for openmpi in C). I also have python 2.7.5 and just installed pip. I'm running this command and get the following errors: sudo pip install mpi4py Collecting mpi4py Using cached mpi4py-2.0.0.tar.gz Installing > collected packages: mpi4py Running setup.py install for mpi4py ... > error > Complete output from command /usr/bin/python2 -u -c "import setuptools, > tokenize;__file__='/tmp/pip-build-x5jD4O/mpi4py/setup.py';exec(compile(getattr(tokenize, > 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, > 'exec'))" install --record /tmp/pip-mpMoZO-record/install-record.txt > --single-version-externally-managed --compile: > running install > running build > running build_src > running build_py > creating build > creating build/lib.linux-x86_64-2.7 > creating build/lib.linux-x86_64-2.7/mpi4py > copying src/__main__.py -> build/lib.linux-x86_64-2.7/mpi4py > copying src/__init__.py -> build/lib.linux-x86_64-2.7/mpi4py > creating build/lib.linux-x86_64-2.7/mpi4py/include > creating build/lib.linux-x86_64-2.7/mpi4py/include/mpi4py > copying src/include/mpi4py/mpi4py.MPI.h -> build/lib.linux-x86_64-2.7/mpi4py/include/mpi4py > copying src/include/mpi4py/mpi4py.MPI_api.h -> build/lib.linux-x86_64-2.7/mpi4py/include/mpi4py > copying src/include/mpi4py/mpi4py.h -> build/lib.linux-x86_64-2.7/mpi4py/include/mpi4py > copying src/include/mpi4py/__init__.pxd -> build/lib.linux-x86_64-2.7/mpi4py/include/mpi4py > copying src/include/mpi4py/libmpi.pxd -> build/lib.linux-x86_64-2.7/mpi4py/include/mpi4py > copying src/include/mpi4py/MPI.pxd -> build/lib.linux-x86_64-2.7/mpi4py/include/mpi4py > copying src/include/mpi4py/__init__.pyx -> build/lib.linux-x86_64-2.7/mpi4py/include/mpi4py > copying src/include/mpi4py/mpi.pxi -> build/lib.linux-x86_64-2.7/mpi4py/include/mpi4py > copying src/include/mpi4py/mpi4py.i -> build/lib.linux-x86_64-2.7/mpi4py/include/mpi4py > copying src/MPI.pxd -> build/lib.linux-x86_64-2.7/mpi4py > copying src/libmpi.pxd -> build/lib.linux-x86_64-2.7/mpi4py > running build_clib > MPI configuration: [mpi] from 'mpi.cfg' > checking for library 'lmpe' ... > gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -c _configtest.c -o _configtest.o > gcc -pthread _configtest.o -llmpe -o _configtest > /bin/ld: cannot find -llmpe > collect2: error: ld returned 1 exit status > failure. > removing: _configtest.c _configtest.o > building 'mpe' dylib library > creating build/temp.linux-x86_64-2.7 > creating build/temp.linux-x86_64-2.7/src > creating build/temp.linux-x86_64-2.7/src/lib-pmpi > gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -c src/lib-pmpi/mpe.c -o build/temp.linux-x86_64-2.7/src/lib-pmpi/mpe.o > creating build/lib.linux-x86_64-2.7/mpi4py/lib-pmpi > gcc -pthread -shared -Wl,-z,relro build/temp.linux-x86_64-2.7/src/lib-pmpi/mpe.o -o > build/lib.linux-x86_64-2.7/mpi4py/lib-pmpi/libmpe.so > checking for library 'vt-mpi' ... > gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -c _configtest.c -o _configtest.o > gcc -pthread _configtest.o -lvt-mpi -o _configtest > /bin/ld: cannot find -lvt-mpi > collect2: error: ld returned 1 exit status > failure. > removing: _configtest.c _configtest.o > checking for library 'vt.mpi' ... > gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -c _configtest.c -o _configtest.o > gcc -pthread _configtest.o -lvt.mpi -o _configtest > /bin/ld: cannot find -lvt.mpi > collect2: error: ld returned 1 exit status > failure. > removing: _configtest.c _configtest.o > building 'vt' dylib library > gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -c src/lib-pmpi/vt.c -o build/temp.linux-x86_64-2.7/src/lib-pmpi/vt.o > gcc -pthread -shared -Wl,-z,relro build/temp.linux-x86_64-2.7/src/lib-pmpi/vt.o -o > build/lib.linux-x86_64-2.7/mpi4py/lib-pmpi/libvt.so > checking for library 'vt-mpi' ... > gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -c _configtest.c -o _configtest.o > gcc -pthread _configtest.o -lvt-mpi -o _configtest > /bin/ld: cannot find -lvt-mpi > collect2: error: ld returned 1 exit status > failure. > removing: _configtest.c _configtest.o > checking for library 'vt.mpi' ... > gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -c _configtest.c -o _configtest.o > gcc -pthread _configtest.o -lvt.mpi -o _configtest > /bin/ld: cannot find -lvt.mpi > collect2: error: ld returned 1 exit status > failure. > removing: _configtest.c _configtest.o > building 'vt-mpi' dylib library > gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -c src/lib-pmpi/vt-mpi.c -o build/temp.linux-x86_64-2.7/src/lib-pmpi/vt-mpi.o > gcc -pthread -shared -Wl,-z,relro build/temp.linux-x86_64-2.7/src/lib-pmpi/vt-mpi.o -o > build/lib.linux-x86_64-2.7/mpi4py/lib-pmpi/libvt-mpi.so > checking for library 'vt-hyb' ... > gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -c _configtest.c -o _configtest.o > gcc -pthread _configtest.o -lvt-hyb -o _configtest > /bin/ld: cannot find -lvt-hyb > collect2: error: ld returned 1 exit status > failure. > removing: _configtest.c _configtest.o > checking for library 'vt.ompi' ... > gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -c _configtest.c -o _configtest.o > gcc -pthread _configtest.o -lvt.ompi -o _configtest > /bin/ld: cannot find -lvt.ompi > collect2: error: ld returned 1 exit status > failure. > removing: _configtest.c _configtest.o > building 'vt-hyb' dylib library > gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -c src/lib-pmpi/vt-hyb.c -o build/temp.linux-x86_64-2.7/src/lib-pmpi/vt-hyb.o > gcc -pthread -shared -Wl,-z,relro build/temp.linux-x86_64-2.7/src/lib-pmpi/vt-hyb.o -o > build/lib.linux-x86_64-2.7/mpi4py/lib-pmpi/libvt-hyb.so > running build_ext > MPI configuration: [mpi] from 'mpi.cfg' > checking for MPI compile and link ... > gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.7 -c _configtest.c -o _configtest.o > _configtest.c:2:17: fatal error: mpi.h: No such file or directory > #include <mpi.h> > ^ > compilation terminated. > failure. > removing: _configtest.c _configtest.o > error: Cannot compile MPI programs. Check your configuration!!! I tried every solution I found so far and none seemed to work, has anyone any idea about this problem, please? Thank you
Run into the same issue and solved with: yum install openmpi-devel export CC=/usr/lib64/openmpi/bin/mpicc pip install mpi4py
it seems you missed to install the development files of OpenMPI on Centos, the line that is the key here is: _configtest.c:2:17: fatal error: mpi.h: No such file or directory #include <mpi.h> you should install the openmpi-devel (or equivalent) through yum and you should be good to reinstall the mpi4py module.
You could also try: CentOS yum install python-mpi4py yum install python3-mpi4py Debian apt install python-mpi4py apt install python3-mpi4py
For anyone else who runs into this, I'm posting this answer just in case you have a similar problem to me. The answer from #francis was the key. On my Centos7.7 system I was able to install mpi4py using the CC environment variable suggested by #iakov-nakhimovski but it was not working and I was getting runtime errors. The problem turned out to be that other software installed on the system had its own python installation in the path which was interfering with the setup of mpi4py. The solution was to remove this other installation from the path and to load the openmpi module which was shipped with the openmpi-devel package (I think). module load mpi/openmpi-x86_64 Then install mpi4py using pip (note you do not need to explicitly define CC=mpicc since all these tools get put into the path by the environment module). When running a python script which requires mpi4py you also need to load this module.
P4API.cpp:39:20: fatal error: Python.h: No such file or directory
Getting fatal error while installing p4python on linux machine. configuration: Python 2.7.5 os : fedora Below is the message I am getting while installing "p4python": $ pip install p4python creating build/lib.linux-x86_64-2.7 copying P4.py -> build/lib.linux-x86_64-2.7 running build_ext building 'P4API' extension creating build/temp.linux-x86_64-2.7 gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DID_OS="LINUX31X86_64" -DID_REL="2015.1.MAIN" -DID_PATCH="1058604" -DID_API="2015.1/1054991" -DID_Y="2015" -DID_M="05" -DID_D="12" -I/tmp/p4api-2015.1.1054991 -I/tmp/p4api-2015.1.1054991/include/p4 -I/usr/include/python2.7 -c P4API.cpp -o build/temp.linux-x86_64-2.7/P4API.o -DOS_LINUX -DOS_LINUX31 -DOS_LINUXX86_64 -DOS_LINUX31X86_64 P4API.cpp:39:20: fatal error: Python.h: No such file or directory #include <Python.h> ^ compilation terminated. error: command 'gcc' failed with exit status 1 ----------------------------------------
You need to install the python header files something like: yum install python-devel