Dependencies issue building a Dockerfile - python

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.

Related

pyuci openwrt package installation fails (how to install libuci in first place?)

Following this link to install pyuci
https://pypi.org/project/pyuci/
$ sudo pip install pyuci
Collecting pyuci
Using cached pyuci-0.9.0.tar.gz (33 kB)
Building wheels for collected packages: pyuci
Building wheel for pyuci (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-l1y3wubl/pyuci/setup.py'"'"'; __file__='"'"'/tmp/pip-install-l1y3wubl/pyuci/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().re
place('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-usoi27u_
cwd: /tmp/pip-install-l1y3wubl/pyuci/
Complete output (18 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.8
creating build/lib.linux-x86_64-3.8/euci
copying euci/__init__.py -> build/lib.linux-x86_64-3.8/euci
copying euci/boolean.py -> build/lib.linux-x86_64-3.8/euci
running build_ext
building 'uci' extension
creating build/temp.linux-x86_64-3.8
x86_64-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 -I/usr/include/python3.8 -c ucimodule.c -o build/temp.linux-x86_64-3.8/ucimodule.o
x86_64-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 -I/usr/include/python3.8 -c pyuci.c -o build/temp.linux-x86_64-3.8/pyuci.o
pyuci.c:20:10: fatal error: uci.h: No such file or directory
20 | #include <uci.h>
| ^~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for pyuci
Running setup.py clean for pyuci
Failed to build pyuci
Installing collected packages: pyuci
Running setup.py install for pyuci ... error
Although I see libuci as one of the requirements in the link I am not sure how to install libuci itself
Appreciate any suggestions and help
My dev environment:
Ubuntu 20.04.3 LTS
Python 3.8.10
Thanks in advance

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

Rekall Forensic framwork: Failed building wheel for readline

During installing latest version of google Rekall Forensic framwork, at the step of installing "rekall-agent" it says: "Failed building wheel for readline"
I am installing it on Kali Linux(2016-02) default python version is 2.7.12
at the step of installing rekall-agent I face exception and error.here is the error part with verbose switch:
============ Building the readline extension module ============
running bdist_wheel
running build
running build_ext
building 'readline' extension
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/Modules
creating build/temp.linux-x86_64-2.7/Modules/2.x
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-oH9M6v/python2.7-2.7.12=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DHAVE_RL_CALLBACK -DHAVE_RL_CATCH_SIGNAL -DHAVE_RL_COMPLETION_APPEND_CHARACTER -DHAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK -DHAVE_RL_COMPLETION_MATCHES -DHAVE_RL_COMPLETION_SUPPRESS_APPEND -DHAVE_RL_PRE_INPUT_HOOK -I. -I/usr/include/python2.7 -c Modules/2.x/readline.c -o build/temp.linux-x86_64-2.7/Modules/2.x/readline.o -Wno-strict-prototypes
creating build/lib.linux-x86_64-2.7
x86_64-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-oH9M6v/python2.7-2.7.12=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-oH9M6v/python2.7-2.7.12=. -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/Modules/2.x/readline.o readline/libreadline.a readline/libhistory.a -lncurses -o build/lib.linux-x86_64-2.7/readline.so
/usr/bin/ld: cannot find -lncurses
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
error
Failed building wheel for readline
Running setup.py clean for readline
Running command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-t5Y300/readline/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" clean --all
running clean
removing 'build/temp.linux-x86_64-2.7' (and everything under it)
removing 'build/lib.linux-x86_64-2.7' (and everything under it)
'build/bdist.linux-x86_64' does not exist -- can't clean it
'build/scripts-2.7' does not exist -- can't clean it
removing 'build'
Failed to build readline
Installing collected packages: readline, rekall
Running setup.py install for readline ... Running command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-t5Y300/readline/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-Gvwo7F-record/install-record.txt --single-version-externally-managed --compile
running install
running build
running build_ext
building 'readline' extension
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/Modules
creating build/temp.linux-x86_64-2.7/Modules/2.x
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-oH9M6v/python2.7-2.7.12=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DHAVE_RL_CALLBACK -DHAVE_RL_CATCH_SIGNAL -DHAVE_RL_COMPLETION_APPEND_CHARACTER -DHAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK -DHAVE_RL_COMPLETION_MATCHES -DHAVE_RL_COMPLETION_SUPPRESS_APPEND -DHAVE_RL_PRE_INPUT_HOOK -I. -I/usr/include/python2.7 -c Modules/2.x/readline.c -o build/temp.linux-x86_64-2.7/Modules/2.x/readline.o -Wno-strict-prototypes
creating build/lib.linux-x86_64-2.7
x86_64-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-oH9M6v/python2.7-2.7.12=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-oH9M6v/python2.7-2.7.12=. -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/Modules/2.x/readline.o readline/libreadline.a readline/libhistory.a -lncurses -o build/lib.linux-x86_64-2.7/readline.so
/usr/bin/ld: cannot find -lncurses
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
error
Cleaning up...
Removing source in /tmp/pip-build-t5Y300/readline
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-t5Y300/readline/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-Gvwo7F-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-t5Y300/readline/
Exception information:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 784, in install
**kwargs
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 878, in install
spinner=spinner,
File "/usr/local/lib/python2.7/dist-packages/pip/utils/__init__.py", line 707, in call_subprocess
% (command_desc, proc.returncode, cwd))
InstallationError: Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-t5Y300/readline/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-Gvwo7F-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-t5Y300/readline/
I also tried to reinstall "gcc" and "python2.7-dev" as from error log and searching other topics I was thinking the problem is about them but not solved
The real issue is this line:
/usr/bin/ld: cannot find -lncurses
In general, this means that the linker is unable to find a specific library archive that is required in order to build the package. Check that you have ncurses installed, or install it via
$ apt install ncurses

How to install polyglot on Raspberry Pi? - problems with compatibility

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

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

Categories