Failing to 'pip3 install apex' down to failure to build cryptacular (installed) - python

Problem: pip3 install apex fails because of failure to build cryptacular, errors as below.
cryptacular was successfully installed (before attempts of installing apex) using this one-liner: pip3 install -e hg+https://bitbucket.org/dholth/cryptacular#cb96fb3#egg=cryptacular
Somehow it would not install with plain pip/pip3 install cryptacular, so the only way I found to successfully install this package is following these instructions, equivalent to these instructions.
However once I run pip3 install apex I receive the exact same error again.
It doesn't seem to be pip/pip3 issue - I've tried both with the same result.
Any ideas on what I am doing wrong?
Collecting apex
Collecting requests (from apex)
Using cached https://files.pythonhosted.org/packages/7d/e3/20f3d364d6c8e5d2353c72a67778eb189176f08e873c9900e10c0287b84b/requests-2.21.0-py2.py3-none-any.whl
----------------------- loads of "collecting" messages -------------------------
Collecting PasteDeploy>=2.0 (from plaster-pastedeploy->pyramid>1.1.2->apex)
Using cached https://files.pythonhosted.org/packages/67/0c/faa9971b2e5e048b3b30008d04c72e4d5f63b42f48937c169acce2c5e70a/PasteDeploy-2.0.1-py2.py3-none-any.whl
Building wheels for collected packages: cryptacular
Running setup.py bdist_wheel for cryptacular ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-d8_sob/cryptacular/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmp7vBhDEpip-wheel- --python-tag cp27:
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/cryptacular
copying cryptacular/__init__.py -> build/lib.linux-x86_64-2.7/cryptacular
creating build/lib.linux-x86_64-2.7/cryptacular/bcrypt
copying cryptacular/bcrypt/__init__.py -> build/lib.linux-x86_64-2.7/cryptacular/bcrypt
copying cryptacular/bcrypt/test_bcrypt.py -> build/lib.linux-x86_64-2.7/cryptacular/bcrypt
creating build/lib.linux-x86_64-2.7/cryptacular/core
copying cryptacular/core/test_core.py -> build/lib.linux-x86_64-2.7/cryptacular/core
...
creating build/temp.linux-x86_64-2.7/cryptacular/bcrypt
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-3hk45v/python2.7-2.7.15~rc1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DNO_BF_ASM -Icrypt_blowfish-1.2/ -I/usr/include/python2.7 -c crypt_blowfish-1.2/crypt_blowfish.c -o build/temp.linux-x86_64-2.7/crypt_blowfish-1.2/crypt_blowfish.o
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-3hk45v/python2.7-2.7.15~rc1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DNO_BF_ASM -Icrypt_blowfish-1.2/ -I/usr/include/python2.7 -c crypt_blowfish-1.2/crypt_gensalt.c -o build/temp.linux-x86_64-2.7/crypt_blowfish-1.2/crypt_gensalt.o
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-3hk45v/python2.7-2.7.15~rc1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DNO_BF_ASM -Icrypt_blowfish-1.2/ -I/usr/include/python2.7 -c crypt_blowfish-1.2/wrapper.c -o build/temp.linux-x86_64-2.7/crypt_blowfish-1.2/wrapper.o
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-3hk45v/python2.7-2.7.15~rc1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DNO_BF_ASM -Icrypt_blowfish-1.2/ -I/usr/include/python2.7 -c cryptacular/bcrypt/_bcrypt.c -o build/temp.linux-x86_64-2.7/cryptacular/bcrypt/_bcrypt.o
In file included from /usr/include/python2.7/Python.h:47:0,
from cryptacular/bcrypt/_bcrypt.c:26:
crypt_blowfish-1.2/crypt.h:17:10: fatal error: gnu-crypt.h: No such file or directory
#include <gnu-crypt.h>
^~~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Failed building wheel for cryptacular
Running setup.py clean for cryptacular
Failed to build cryptacular
Installing collected packages: urllib3, certifi, chardet, idna, requests, wtforms, wtforms-recaptcha, setuptools, zope.interface, repoze.lru, PasteDeploy, plaster, plaster-pastedeploy, webob, venusian, zope.deprecation, translationstring, hupper, pyramid, oauthlib, requests-oauthlib, python-openid, anykeystore, velruse, transaction, repoze.sendmail, pyramid-mailer, SQLAlchemy, zope.sqlalchemy, pbkdf2, cryptacular, apex
Running setup.py install for cryptacular ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-d8_sob/cryptacular/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-Br1FfW-record/install-record.txt --single-version-externally-managed --compile --user --prefix=:
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/cryptacular
copying cryptacular/__init__.py -> build/lib.linux-x86_64-2.7/cryptacular
creating build/lib.linux-x86_64-2.7/cryptacular/bcrypt
copying cryptacular/bcrypt/__init__.py -> build/lib.linux-x86_64-2.7/cryptacular/bcrypt
...
creating build/temp.linux-x86_64-2.7/cryptacular/bcrypt
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-3hk45v/python2.7-2.7.15~rc1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DNO_BF_ASM -Icrypt_blowfish-1.2/ -I/usr/include/python2.7 -c crypt_blowfish-1.2/crypt_blowfish.c -o build/temp.linux-x86_64-2.7/crypt_blowfish-1.2/crypt_blowfish.o
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-3hk45v/python2.7-2.7.15~rc1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DNO_BF_ASM -Icrypt_blowfish-1.2/ -I/usr/include/python2.7 -c crypt_blowfish-1.2/crypt_gensalt.c -o build/temp.linux-x86_64-2.7/crypt_blowfish-1.2/crypt_gensalt.o
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-3hk45v/python2.7-2.7.15~rc1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DNO_BF_ASM -Icrypt_blowfish-1.2/ -I/usr/include/python2.7 -c crypt_blowfish-1.2/wrapper.c -o build/temp.linux-x86_64-2.7/crypt_blowfish-1.2/wrapper.o
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-3hk45v/python2.7-2.7.15~rc1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DNO_BF_ASM -Icrypt_blowfish-1.2/ -I/usr/include/python2.7 -c cryptacular/bcrypt/_bcrypt.c -o build/temp.linux-x86_64-2.7/cryptacular/bcrypt/_bcrypt.o
In file included from /usr/include/python2.7/Python.h:47:0,
from cryptacular/bcrypt/_bcrypt.c:26:
crypt_blowfish-1.2/crypt.h:17:10: fatal error: gnu-crypt.h: No such file or directory
#include <gnu-crypt.h>
^~~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-d8_sob/cryptacular/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-Br1FfW-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-d8_sob/cryptacular/
UPDATE:
Once I force gnu-crypt.h into required place: cd /usr/include && sudo mv crypt.h gnu-crypt.h I get a new but similar error:
...
creating build/temp.linux-x86_64-2.7/cryptacular/bcrypt
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-3hk45v/python2.7-2.7.15~rc1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DNO_BF_ASM -Icrypt_blowfish-1.2/ -I/usr/include/python2.7 -c crypt_blowfish-1.2/crypt_blowfish.c -o build/temp.linux-x86_64-2.7/crypt_blowfish-1.2/crypt_blowfish.o
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-3hk45v/python2.7-2.7.15~rc1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DNO_BF_ASM -Icrypt_blowfish-1.2/ -I/usr/include/python2.7 -c crypt_blowfish-1.2/crypt_gensalt.c -o build/temp.linux-x86_64-2.7/crypt_blowfish-1.2/crypt_gensalt.o
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-3hk45v/python2.7-2.7.15~rc1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DNO_BF_ASM -Icrypt_blowfish-1.2/ -I/usr/include/python2.7 -c crypt_blowfish-1.2/wrapper.c -o build/temp.linux-x86_64-2.7/crypt_blowfish-1.2/wrapper.o
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-3hk45v/python2.7-2.7.15~rc1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DNO_BF_ASM -Icrypt_blowfish-1.2/ -I/usr/include/python2.7 -c cryptacular/bcrypt/_bcrypt.c -o build/temp.linux-x86_64-2.7/cryptacular/bcrypt/_bcrypt.o
In file included from cryptacular/bcrypt/_bcrypt.c:27:0:
crypt_blowfish-1.2/ow-crypt.h:27:14: error: conflicting types for ‘crypt_r’
extern char *crypt_r(__const char *key, __const char *setting, void *data);
^~~~~~~
In file included from crypt_blowfish-1.2/crypt.h:17:0,
from /usr/include/python2.7/Python.h:47,
from cryptacular/bcrypt/_bcrypt.c:26:
/usr/include/gnu-crypt.h:60:14: note: previous declaration of ‘crypt_r’ was here
extern char *crypt_r (const char *__key, const char *__salt,
^~~~~~~
cryptacular/bcrypt/_bcrypt.c: In function ‘init_bcrypt’:
cryptacular/bcrypt/_bcrypt.c:129:19: warning: unused variable ‘module’ [-Wunused-variable]
PyObject *module = Py_InitModule("_bcrypt", _bcrypt_methods);
^~~~~~
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Failed building wheel for cryptacular
Running setup.py clean for cryptacular
Failed to build cryptacular
Installing collected packages: urllib3, certifi, chardet, idna, requests, wtforms, wtforms-recaptcha, setuptools, zope.interface, repoze.lru, PasteDeploy, plaster, plaster-pastedeploy, webob, venusian, zope.deprecation, translationstring, hupper, pyramid, oauthlib, requests-oauthlib, python-openid, anykeystore, velruse, transaction, repoze.sendmail, pyramid-mailer, SQLAlchemy, zope.sqlalchemy, pbkdf2, cryptacular, apex
Running setup.py install for cryptacular ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-pqj6l9/cryptacular/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-CRC3Cz-record/install-record.txt --single-version-externally-managed --compile --user --prefix=:
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/cryptacular
...
writing manifest file 'cryptacular.egg-info/SOURCES.txt'
copying cryptacular/bcrypt/_bcrypt.c -> build/lib.linux-x86_64-2.7/cryptacular/bcrypt
running build_ext
building 'cryptacular.bcrypt._bcrypt' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/crypt_blowfish-1.2
creating build/temp.linux-x86_64-2.7/cryptacular
creating build/temp.linux-x86_64-2.7/cryptacular/bcrypt
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-3hk45v/python2.7-2.7.15~rc1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DNO_BF_ASM -Icrypt_blowfish-1.2/ -I/usr/include/python2.7 -c crypt_blowfish-1.2/crypt_blowfish.c -o build/temp.linux-x86_64-2.7/crypt_blowfish-1.2/crypt_blowfish.o
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-3hk45v/python2.7-2.7.15~rc1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DNO_BF_ASM -Icrypt_blowfish-1.2/ -I/usr/include/python2.7 -c crypt_blowfish-1.2/crypt_gensalt.c -o build/temp.linux-x86_64-2.7/crypt_blowfish-1.2/crypt_gensalt.o
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-3hk45v/python2.7-2.7.15~rc1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DNO_BF_ASM -Icrypt_blowfish-1.2/ -I/usr/include/python2.7 -c crypt_blowfish-1.2/wrapper.c -o build/temp.linux-x86_64-2.7/crypt_blowfish-1.2/wrapper.o
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-3hk45v/python2.7-2.7.15~rc1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DNO_BF_ASM -Icrypt_blowfish-1.2/ -I/usr/include/python2.7 -c cryptacular/bcrypt/_bcrypt.c -o build/temp.linux-x86_64-2.7/cryptacular/bcrypt/_bcrypt.o
In file included from cryptacular/bcrypt/_bcrypt.c:27:0:
crypt_blowfish-1.2/ow-crypt.h:27:14: error: conflicting types for ‘crypt_r’
extern char *crypt_r(__const char *key, __const char *setting, void *data);
^~~~~~~
In file included from crypt_blowfish-1.2/crypt.h:17:0,
from /usr/include/python2.7/Python.h:47,
from cryptacular/bcrypt/_bcrypt.c:26:
/usr/include/gnu-crypt.h:60:14: note: previous declaration of ‘crypt_r’ was here
extern char *crypt_r (const char *__key, const char *__salt,
^~~~~~~
cryptacular/bcrypt/_bcrypt.c: In function ‘init_bcrypt’:
cryptacular/bcrypt/_bcrypt.c:129:19: warning: unused variable ‘module’ [-Wunused-variable]
PyObject *module = Py_InitModule("_bcrypt", _bcrypt_methods);
^~~~~~
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-pqj6l9/cryptacular/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-CRC3Cz-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-pqj6l9/cryptacular/

Uninstall the previous versions of apex. Then do these steps:
git clone https://www.github.com/nvidia/apex
cd apex
python setup.py install
worked like charm for me

Related

Python script cannot be compiled on Heroku

so i found a twitter monitor on github and wanted to host it on heroku. i watched a few videos and updated the requirements.txt, added the Procfile, and added the runtime.txt file and put my version of python in it.
but i only get errors when i try to build the app on heroku.
the error log:
-----> Building on the Heroku-20 stack
-----> Using buildpack: heroku/python
-----> Python app detected
-----> Using Python version specified in runtime.txt
-----> Installing python-3.9.6
-----> Installing pip 20.2.4, setuptools 47.1.1 and wheel 0.36.2
-----> Installing SQLite3
-----> Installing requirements with pip
Collecting aiohttp==3.5.4
Downloading aiohttp-3.5.4.tar.gz (1.1 MB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing wheel metadata: started
Preparing wheel metadata: finished with status 'done'
Collecting astroid==2.2.5
Downloading astroid-2.2.5-py3-none-any.whl (193 kB)
Collecting async-timeout==3.0.1
Downloading async_timeout-3.0.1-py3-none-any.whl (8.2 kB)
Collecting attrs==19.1.0
Downloading attrs-19.1.0-py2.py3-none-any.whl (35 kB)
Collecting certifi==2019.6.16
Downloading certifi-2019.6.16-py2.py3-none-any.whl (157 kB)
Collecting chardet==3.0.4
Downloading chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Collecting dhooks==1.1.4
Downloading dhooks-1.1.4.tar.gz (11 kB)
Collecting idna==2.7
Downloading idna-2.7-py2.py3-none-any.whl (58 kB)
Collecting isort==4.3.21
Downloading isort-4.3.21-py2.py3-none-any.whl (42 kB)
Collecting lazy-object-proxy==1.4.1
Downloading lazy-object-proxy-1.4.1.tar.gz (34 kB)
Collecting mccabe==0.6.1
Downloading mccabe-0.6.1-py2.py3-none-any.whl (8.6 kB)
Collecting multidict==4.5.2
Downloading multidict-4.5.2.tar.gz (105 kB)
Collecting oauthlib==3.0.2
Downloading oauthlib-3.0.2-py2.py3-none-any.whl (143 kB)
Collecting pyfiglet==0.8.post1
Downloading pyfiglet-0.8.post1-py2.py3-none-any.whl (865 kB)
Collecting pylint==2.3.1
Downloading pylint-2.3.1-py3-none-any.whl (765 kB)
Collecting PySocks==1.7.0
Downloading PySocks-1.7.0-py3-none-any.whl (16 kB)
Collecting requests==2.20.1
Downloading requests-2.20.1-py2.py3-none-any.whl (57 kB)
Collecting requests-oauthlib==1.2.0
Downloading requests_oauthlib-1.2.0-py2.py3-none-any.whl (22 kB)
Collecting six==1.12.0
Downloading six-1.12.0-py2.py3-none-any.whl (10 kB)
Collecting tweepy==3.8.0
Downloading tweepy-3.8.0-py2.py3-none-any.whl (28 kB)
Collecting typed-ast==1.4.0
Downloading typed_ast-1.4.0.tar.gz (206 kB)
Collecting urllib3==1.24.3
Downloading urllib3-1.24.3-py2.py3-none-any.whl (118 kB)
Collecting wrapt==1.11.2
Downloading wrapt-1.11.2.tar.gz (27 kB)
Collecting yarl==1.3.0
Downloading yarl-1.3.0.tar.gz (159 kB)
Building wheels for collected packages: aiohttp, dhooks, lazy-object-proxy, multidict, typed-ast, wrapt, yarl
Building wheel for aiohttp (PEP 517): started
Building wheel for aiohttp (PEP 517): finished with status 'done'
Created wheel for aiohttp: filename=aiohttp-3.5.4-py3-none-any.whl size=433157 sha256=29dd53b9a92c453e0c433b26b4e3fbb4f05d55b532b46bfcb1cb207cdc2e3d03
Stored in directory: /tmp/pip-ephem-wheel-cache-0wegl4mw/wheels/4d/b9/64/93e895a06acf653b24f528f16003ca62551660fe57e028244b
Building wheel for dhooks (setup.py): started
Building wheel for dhooks (setup.py): finished with status 'done'
Created wheel for dhooks: filename=dhooks-1.1.4-py3-none-any.whl size=10502 sha256=c9373ca3e2d4f3e9482787f5e30ae592874c4766f55e5c45a6e5ec15ba71704c
Stored in directory: /tmp/pip-ephem-wheel-cache-0wegl4mw/wheels/59/50/a2/61375704307229ac46e79852429f0242d2cf11b0664dd8b358
Building wheel for lazy-object-proxy (setup.py): started
Building wheel for lazy-object-proxy (setup.py): finished with status 'done'
Created wheel for lazy-object-proxy: filename=lazy_object_proxy-1.4.1-cp39-cp39-linux_x86_64.whl size=58346 sha256=e71055627445f81b890e08e1c35d0d4b944bdd49edd55eebfc782935a749f616
Stored in directory: /tmp/pip-ephem-wheel-cache-0wegl4mw/wheels/40/e9/b5/5f679270d6a9059323da690bc386aa591c8d7660ecd8733142
Building wheel for multidict (setup.py): started
Building wheel for multidict (setup.py): finished with status 'done'
Created wheel for multidict: filename=multidict-4.5.2-py3-none-any.whl size=90356 sha256=6c83f65791637b6b6c6dc03e1b9fa6f2f9e470b79afa73e1b91b496ebec279b0
Stored in directory: /tmp/pip-ephem-wheel-cache-0wegl4mw/wheels/38/f1/2a/0a44e164fe71bfd21036447af0204caffcedec1f07326e2a55
Building wheel for typed-ast (setup.py): started
Building wheel for typed-ast (setup.py): finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /app/.heroku/python/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-5uz2yehi/typed-ast/setup.py'"'"'; __file__='"'"'/tmp/pip-install-5uz2yehi/typed-ast/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-0gyz_kti
cwd: /tmp/pip-install-5uz2yehi/typed-ast/
Complete output (63 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.9
creating build/lib.linux-x86_64-3.9/typed_ast
copying typed_ast/ast3.py -> build/lib.linux-x86_64-3.9/typed_ast
copying typed_ast/__init__.py -> build/lib.linux-x86_64-3.9/typed_ast
copying typed_ast/ast27.py -> build/lib.linux-x86_64-3.9/typed_ast
copying typed_ast/conversions.py -> build/lib.linux-x86_64-3.9/typed_ast
package init file 'ast3/tests/__init__.py' not found (or not a regular file)
creating build/lib.linux-x86_64-3.9/typed_ast/tests
copying ast3/tests/test_basics.py -> build/lib.linux-x86_64-3.9/typed_ast/tests
running build_ext
building '_ast27' extension
creating build/temp.linux-x86_64-3.9
creating build/temp.linux-x86_64-3.9/ast27
creating build/temp.linux-x86_64-3.9/ast27/Custom
creating build/temp.linux-x86_64-3.9/ast27/Parser
creating build/temp.linux-x86_64-3.9/ast27/Python
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast27/Include -I/app/.heroku/python/include/python3.9 -c ast27/Custom/typed_ast.c -o build/temp.linux-x86_64-3.9/ast27/Custom/typed_ast.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast27/Include -I/app/.heroku/python/include/python3.9 -c ast27/Parser/acceler.c -o build/temp.linux-x86_64-3.9/ast27/Parser/acceler.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast27/Include -I/app/.heroku/python/include/python3.9 -c ast27/Parser/bitset.c -o build/temp.linux-x86_64-3.9/ast27/Parser/bitset.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast27/Include -I/app/.heroku/python/include/python3.9 -c ast27/Parser/grammar.c -o build/temp.linux-x86_64-3.9/ast27/Parser/grammar.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast27/Include -I/app/.heroku/python/include/python3.9 -c ast27/Parser/grammar1.c -o build/temp.linux-x86_64-3.9/ast27/Parser/grammar1.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast27/Include -I/app/.heroku/python/include/python3.9 -c ast27/Parser/node.c -o build/temp.linux-x86_64-3.9/ast27/Parser/node.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast27/Include -I/app/.heroku/python/include/python3.9 -c ast27/Parser/parser.c -o build/temp.linux-x86_64-3.9/ast27/Parser/parser.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast27/Include -I/app/.heroku/python/include/python3.9 -c ast27/Parser/parsetok.c -o build/temp.linux-x86_64-3.9/ast27/Parser/parsetok.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast27/Include -I/app/.heroku/python/include/python3.9 -c ast27/Parser/tokenizer.c -o build/temp.linux-x86_64-3.9/ast27/Parser/tokenizer.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast27/Include -I/app/.heroku/python/include/python3.9 -c ast27/Python/Python-ast.c -o build/temp.linux-x86_64-3.9/ast27/Python/Python-ast.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast27/Include -I/app/.heroku/python/include/python3.9 -c ast27/Python/asdl.c -o build/temp.linux-x86_64-3.9/ast27/Python/asdl.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast27/Include -I/app/.heroku/python/include/python3.9 -c ast27/Python/ast.c -o build/temp.linux-x86_64-3.9/ast27/Python/ast.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast27/Include -I/app/.heroku/python/include/python3.9 -c ast27/Python/graminit.c -o build/temp.linux-x86_64-3.9/ast27/Python/graminit.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast27/Include -I/app/.heroku/python/include/python3.9 -c ast27/Python/mystrtoul.c -o build/temp.linux-x86_64-3.9/ast27/Python/mystrtoul.o
gcc -pthread -shared build/temp.linux-x86_64-3.9/ast27/Custom/typed_ast.o build/temp.linux-x86_64-3.9/ast27/Parser/acceler.o build/temp.linux-x86_64-3.9/ast27/Parser/bitset.o build/temp.linux-x86_64-3.9/ast27/Parser/grammar.o build/temp.linux-x86_64-3.9/ast27/Parser/grammar1.o build/temp.linux-x86_64-3.9/ast27/Parser/node.o build/temp.linux-x86_64-3.9/ast27/Parser/parser.o build/temp.linux-x86_64-3.9/ast27/Parser/parsetok.o build/temp.linux-x86_64-3.9/ast27/Parser/tokenizer.o build/temp.linux-x86_64-3.9/ast27/Python/Python-ast.o build/temp.linux-x86_64-3.9/ast27/Python/asdl.o build/temp.linux-x86_64-3.9/ast27/Python/ast.o build/temp.linux-x86_64-3.9/ast27/Python/graminit.o build/temp.linux-x86_64-3.9/ast27/Python/mystrtoul.o -o build/lib.linux-x86_64-3.9/typed_ast/_ast27.cpython-39-x86_64-linux-gnu.so
building '_ast3' extension
creating build/temp.linux-x86_64-3.9/ast3
creating build/temp.linux-x86_64-3.9/ast3/Custom
creating build/temp.linux-x86_64-3.9/ast3/Parser
creating build/temp.linux-x86_64-3.9/ast3/Python
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast3/Include -I/app/.heroku/python/include/python3.9 -c ast3/Custom/typed_ast.c -o build/temp.linux-x86_64-3.9/ast3/Custom/typed_ast.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast3/Include -I/app/.heroku/python/include/python3.9 -c ast3/Parser/acceler.c -o build/temp.linux-x86_64-3.9/ast3/Parser/acceler.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast3/Include -I/app/.heroku/python/include/python3.9 -c ast3/Parser/bitset.c -o build/temp.linux-x86_64-3.9/ast3/Parser/bitset.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast3/Include -I/app/.heroku/python/include/python3.9 -c ast3/Parser/grammar.c -o build/temp.linux-x86_64-3.9/ast3/Parser/grammar.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast3/Include -I/app/.heroku/python/include/python3.9 -c ast3/Parser/grammar1.c -o build/temp.linux-x86_64-3.9/ast3/Parser/grammar1.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast3/Include -I/app/.heroku/python/include/python3.9 -c ast3/Parser/node.c -o build/temp.linux-x86_64-3.9/ast3/Parser/node.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast3/Include -I/app/.heroku/python/include/python3.9 -c ast3/Parser/parser.c -o build/temp.linux-x86_64-3.9/ast3/Parser/parser.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast3/Include -I/app/.heroku/python/include/python3.9 -c ast3/Parser/parsetok.c -o build/temp.linux-x86_64-3.9/ast3/Parser/parsetok.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast3/Include -I/app/.heroku/python/include/python3.9 -c ast3/Parser/tokenizer.c -o build/temp.linux-x86_64-3.9/ast3/Parser/tokenizer.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast3/Include -I/app/.heroku/python/include/python3.9 -c ast3/Python/Python-ast.c -o build/temp.linux-x86_64-3.9/ast3/Python/Python-ast.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast3/Include -I/app/.heroku/python/include/python3.9 -c ast3/Python/asdl.c -o build/temp.linux-x86_64-3.9/ast3/Python/asdl.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast3/Include -I/app/.heroku/python/include/python3.9 -c ast3/Python/ast.c -o build/temp.linux-x86_64-3.9/ast3/Python/ast.o
ast3/Python/ast.c: In function ‘decode_bytes_with_escapes’:
ast3/Python/ast.c:4534:24: error: too many arguments to function ‘_PyBytes_DecodeEscape’
4534 | PyObject *result = _PyBytes_DecodeEscape(s, len, NULL, 0, NULL,
| ^~~~~~~~~~~~~~~~~~~~~
In file included from /app/.heroku/python/include/python3.9/bytesobject.h:75,
from /app/.heroku/python/include/python3.9/Python.h:105,
from ast3/Python/ast.c:6:
/app/.heroku/python/include/python3.9/cpython/bytesobject.h:28:24: note: declared here
28 | PyAPI_FUNC(PyObject *) _PyBytes_DecodeEscape(const char *, Py_ssize_t,
| ^~~~~~~~~~~~~~~~~~~~~
error: command '/usr/bin/gcc' failed with exit code 1
----------------------------------------
ERROR: Failed building wheel for typed-ast
Running setup.py clean for typed-ast
Building wheel for wrapt (setup.py): started
Building wheel for wrapt (setup.py): finished with status 'done'
Created wheel for wrapt: filename=wrapt-1.11.2-cp39-cp39-linux_x86_64.whl size=78284 sha256=7cd943edfab88fae68d5ac2cd5c99e63c882ab1097a0b3a77a6e4074e36fdad6
Stored in directory: /tmp/pip-ephem-wheel-cache-0wegl4mw/wheels/76/e9/66/d4e35bfa6cde3925ff1c497043d7a2ccb305c07ac51fef0e31
Building wheel for yarl (setup.py): started
Building wheel for yarl (setup.py): finished with status 'done'
Created wheel for yarl: filename=yarl-1.3.0-py3-none-any.whl size=84914 sha256=897cf5f968677228befd5c5137f3dd98c6d5255b417d88d6227e0266d5612bdb
Stored in directory: /tmp/pip-ephem-wheel-cache-0wegl4mw/wheels/c6/b1/70/86cee44ad7a932f47a0af5e391959c01b42447601b6ba467ca
Successfully built aiohttp dhooks lazy-object-proxy multidict wrapt yarl
Failed to build typed-ast
Installing collected packages: multidict, idna, yarl, async-timeout, attrs, chardet, aiohttp, wrapt, lazy-object-proxy, typed-ast, six, astroid, certifi, urllib3, requests, dhooks, isort, mccabe, oauthlib, pyfiglet, pylint, PySocks, requests-oauthlib, tweepy
Running setup.py install for typed-ast: started
Running setup.py install for typed-ast: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /app/.heroku/python/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-5uz2yehi/typed-ast/setup.py'"'"'; __file__='"'"'/tmp/pip-install-5uz2yehi/typed-ast/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-_lhjgk06/install-record.txt --single-version-externally-managed --compile --install-headers /app/.heroku/python/include/python3.9/typed-ast
cwd: /tmp/pip-install-5uz2yehi/typed-ast/
Complete output (63 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.9
creating build/lib.linux-x86_64-3.9/typed_ast
copying typed_ast/ast3.py -> build/lib.linux-x86_64-3.9/typed_ast
copying typed_ast/__init__.py -> build/lib.linux-x86_64-3.9/typed_ast
copying typed_ast/ast27.py -> build/lib.linux-x86_64-3.9/typed_ast
copying typed_ast/conversions.py -> build/lib.linux-x86_64-3.9/typed_ast
package init file 'ast3/tests/__init__.py' not found (or not a regular file)
creating build/lib.linux-x86_64-3.9/typed_ast/tests
copying ast3/tests/test_basics.py -> build/lib.linux-x86_64-3.9/typed_ast/tests
running build_ext
building '_ast27' extension
creating build/temp.linux-x86_64-3.9
creating build/temp.linux-x86_64-3.9/ast27
creating build/temp.linux-x86_64-3.9/ast27/Custom
creating build/temp.linux-x86_64-3.9/ast27/Parser
creating build/temp.linux-x86_64-3.9/ast27/Python
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast27/Include -I/app/.heroku/python/include/python3.9 -c ast27/Custom/typed_ast.c -o build/temp.linux-x86_64-3.9/ast27/Custom/typed_ast.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast27/Include -I/app/.heroku/python/include/python3.9 -c ast27/Parser/acceler.c -o build/temp.linux-x86_64-3.9/ast27/Parser/acceler.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast27/Include -I/app/.heroku/python/include/python3.9 -c ast27/Parser/bitset.c -o build/temp.linux-x86_64-3.9/ast27/Parser/bitset.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast27/Include -I/app/.heroku/python/include/python3.9 -c ast27/Parser/grammar.c -o build/temp.linux-x86_64-3.9/ast27/Parser/grammar.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast27/Include -I/app/.heroku/python/include/python3.9 -c ast27/Parser/grammar1.c -o build/temp.linux-x86_64-3.9/ast27/Parser/grammar1.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast27/Include -I/app/.heroku/python/include/python3.9 -c ast27/Parser/node.c -o build/temp.linux-x86_64-3.9/ast27/Parser/node.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast27/Include -I/app/.heroku/python/include/python3.9 -c ast27/Parser/parser.c -o build/temp.linux-x86_64-3.9/ast27/Parser/parser.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast27/Include -I/app/.heroku/python/include/python3.9 -c ast27/Parser/parsetok.c -o build/temp.linux-x86_64-3.9/ast27/Parser/parsetok.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast27/Include -I/app/.heroku/python/include/python3.9 -c ast27/Parser/tokenizer.c -o build/temp.linux-x86_64-3.9/ast27/Parser/tokenizer.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast27/Include -I/app/.heroku/python/include/python3.9 -c ast27/Python/Python-ast.c -o build/temp.linux-x86_64-3.9/ast27/Python/Python-ast.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast27/Include -I/app/.heroku/python/include/python3.9 -c ast27/Python/asdl.c -o build/temp.linux-x86_64-3.9/ast27/Python/asdl.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast27/Include -I/app/.heroku/python/include/python3.9 -c ast27/Python/ast.c -o build/temp.linux-x86_64-3.9/ast27/Python/ast.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast27/Include -I/app/.heroku/python/include/python3.9 -c ast27/Python/graminit.c -o build/temp.linux-x86_64-3.9/ast27/Python/graminit.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast27/Include -I/app/.heroku/python/include/python3.9 -c ast27/Python/mystrtoul.c -o build/temp.linux-x86_64-3.9/ast27/Python/mystrtoul.o
gcc -pthread -shared build/temp.linux-x86_64-3.9/ast27/Custom/typed_ast.o build/temp.linux-x86_64-3.9/ast27/Parser/acceler.o build/temp.linux-x86_64-3.9/ast27/Parser/bitset.o build/temp.linux-x86_64-3.9/ast27/Parser/grammar.o build/temp.linux-x86_64-3.9/ast27/Parser/grammar1.o build/temp.linux-x86_64-3.9/ast27/Parser/node.o build/temp.linux-x86_64-3.9/ast27/Parser/parser.o build/temp.linux-x86_64-3.9/ast27/Parser/parsetok.o build/temp.linux-x86_64-3.9/ast27/Parser/tokenizer.o build/temp.linux-x86_64-3.9/ast27/Python/Python-ast.o build/temp.linux-x86_64-3.9/ast27/Python/asdl.o build/temp.linux-x86_64-3.9/ast27/Python/ast.o build/temp.linux-x86_64-3.9/ast27/Python/graminit.o build/temp.linux-x86_64-3.9/ast27/Python/mystrtoul.o -o build/lib.linux-x86_64-3.9/typed_ast/_ast27.cpython-39-x86_64-linux-gnu.so
building '_ast3' extension
creating build/temp.linux-x86_64-3.9/ast3
creating build/temp.linux-x86_64-3.9/ast3/Custom
creating build/temp.linux-x86_64-3.9/ast3/Parser
creating build/temp.linux-x86_64-3.9/ast3/Python
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast3/Include -I/app/.heroku/python/include/python3.9 -c ast3/Custom/typed_ast.c -o build/temp.linux-x86_64-3.9/ast3/Custom/typed_ast.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast3/Include -I/app/.heroku/python/include/python3.9 -c ast3/Parser/acceler.c -o build/temp.linux-x86_64-3.9/ast3/Parser/acceler.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast3/Include -I/app/.heroku/python/include/python3.9 -c ast3/Parser/bitset.c -o build/temp.linux-x86_64-3.9/ast3/Parser/bitset.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast3/Include -I/app/.heroku/python/include/python3.9 -c ast3/Parser/grammar.c -o build/temp.linux-x86_64-3.9/ast3/Parser/grammar.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast3/Include -I/app/.heroku/python/include/python3.9 -c ast3/Parser/grammar1.c -o build/temp.linux-x86_64-3.9/ast3/Parser/grammar1.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast3/Include -I/app/.heroku/python/include/python3.9 -c ast3/Parser/node.c -o build/temp.linux-x86_64-3.9/ast3/Parser/node.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast3/Include -I/app/.heroku/python/include/python3.9 -c ast3/Parser/parser.c -o build/temp.linux-x86_64-3.9/ast3/Parser/parser.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast3/Include -I/app/.heroku/python/include/python3.9 -c ast3/Parser/parsetok.c -o build/temp.linux-x86_64-3.9/ast3/Parser/parsetok.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast3/Include -I/app/.heroku/python/include/python3.9 -c ast3/Parser/tokenizer.c -o build/temp.linux-x86_64-3.9/ast3/Parser/tokenizer.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast3/Include -I/app/.heroku/python/include/python3.9 -c ast3/Python/Python-ast.c -o build/temp.linux-x86_64-3.9/ast3/Python/Python-ast.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast3/Include -I/app/.heroku/python/include/python3.9 -c ast3/Python/asdl.c -o build/temp.linux-x86_64-3.9/ast3/Python/asdl.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast3/Include -I/app/.heroku/python/include/python3.9 -c ast3/Python/ast.c -o build/temp.linux-x86_64-3.9/ast3/Python/ast.o
ast3/Python/ast.c: In function ‘decode_bytes_with_escapes’:
ast3/Python/ast.c:4534:24: error: too many arguments to function ‘_PyBytes_DecodeEscape’
4534 | PyObject *result = _PyBytes_DecodeEscape(s, len, NULL, 0, NULL,
| ^~~~~~~~~~~~~~~~~~~~~
In file included from /app/.heroku/python/include/python3.9/bytesobject.h:75,
from /app/.heroku/python/include/python3.9/Python.h:105,
from ast3/Python/ast.c:6:
/app/.heroku/python/include/python3.9/cpython/bytesobject.h:28:24: note: declared here
28 | PyAPI_FUNC(PyObject *) _PyBytes_DecodeEscape(const char *, Py_ssize_t,
| ^~~~~~~~~~~~~~~~~~~~~
error: command '/usr/bin/gcc' failed with exit code 1
----------------------------------------
ERROR: Command errored out with exit status 1: /app/.heroku/python/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-5uz2yehi/typed-ast/setup.py'"'"'; __file__='"'"'/tmp/pip-install-5uz2yehi/typed-ast/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-_lhjgk06/install-record.txt --single-version-externally-managed --compile --install-headers /app/.heroku/python/include/python3.9/typed-ast Check the logs for full command output.
! Push rejected, failed to compile Python app.
! Push failed
this is my first time using Heroku so i don't really know what i am looking at or where to look when i do find an error. any tips on how to find my problem?
I figured this out.
I went through every single requirement in requirements.txt and changed the version to the newest of every dependency on https://pypi.org/
worked fine after.
figured this out after reading multiple other posts where people simply needed to update from a depreciated version of a dependency they were using so check your dependency versions!

MariaDB Connector/Python installation issue on Ubuntu 20.04 (

I ran into an issue installing mariadb connector for python on Ubuntu 20.04.
I did installed mariadb server and connector for C as they say in the docs:
sudo apt-get update
sudo apt-get install mariadb-server
sudo apt-get install libmariadb3
sudo apt-get install libmariadb-dev
Also installed:
sudo apt-get install libmariadbclient-dev
Then:
$ pip3 install mariadb
Collecting mariadb Using cached mariadb-1.0.3.tar.gz (66 kB) Building wheels for collected packages: mariadb Building wheel for mariadb (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-01wak5oz/mariadb/setup.py'"'"';
__file__='"'"'/tmp/pip-install-01wak5oz/mariadb/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-oazbv39u
cwd: /tmp/pip-install-01wak5oz/mariadb/ Complete output (40 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/mariadb copying mariadb/__init__.py -> build/lib.linux-x86_64-3.8/mariadb creating build/lib.linux-x86_64-3.8/mariadb/constants copying mariadb/constants/__init__.py -> build/lib.linux-x86_64-3.8/mariadb/constants copying mariadb/constants/CLIENT.py -> build/lib.linux-x86_64-3.8/mariadb/constants copying mariadb/constants/INDICATOR.py -> build/lib.linux-x86_64-3.8/mariadb/constants copying mariadb/constants/CURSOR.py -> build/lib.linux-x86_64-3.8/mariadb/constants copying mariadb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-3.8/mariadb/constants running build_ext building 'mariadb._mariadb' extension creating build/temp.linux-x86_64-3.8 creating build/temp.linux-x86_64-3.8/mariadb 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 -DPY_MARIADB_MAJOR_VERSION=1 -DPY_MARIADB_MINOR_VERSION=0 -DPY_MARIADB_PATCH_VERSION=3 -I/usr/include/mariadb -I/usr/include/mariadb/mysql -I./include -I/usr/include/python3.8 -c mariadb/mariadb.c -o build/temp.linux-x86_64-3.8/mariadb/mariadb.o
-DDEFAULT_PLUGINS_SUBDIR="/usr/lib/x86_64-linux-gnu/mariadb19/plugin" 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 -DPY_MARIADB_MAJOR_VERSION=1 -DPY_MARIADB_MINOR_VERSION=0 -DPY_MARIADB_PATCH_VERSION=3 -I/usr/include/mariadb -I/usr/include/mariadb/mysql -I./include -I/usr/include/python3.8 -c mariadb/mariadb_connection.c -o build/temp.linux-x86_64-3.8/mariadb/mariadb_connection.o
-DDEFAULT_PLUGINS_SUBDIR="/usr/lib/x86_64-linux-gnu/mariadb19/plugin" 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 -DPY_MARIADB_MAJOR_VERSION=1 -DPY_MARIADB_MINOR_VERSION=0 -DPY_MARIADB_PATCH_VERSION=3 -I/usr/include/mariadb -I/usr/include/mariadb/mysql -I./include -I/usr/include/python3.8 -c mariadb/mariadb_exception.c -o build/temp.linux-x86_64-3.8/mariadb/mariadb_exception.o
-DDEFAULT_PLUGINS_SUBDIR="/usr/lib/x86_64-linux-gnu/mariadb19/plugin" 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 -DPY_MARIADB_MAJOR_VERSION=1 -DPY_MARIADB_MINOR_VERSION=0 -DPY_MARIADB_PATCH_VERSION=3 -I/usr/include/mariadb -I/usr/include/mariadb/mysql -I./include -I/usr/include/python3.8 -c mariadb/mariadb_cursor.c -o build/temp.linux-x86_64-3.8/mariadb/mariadb_cursor.o
-DDEFAULT_PLUGINS_SUBDIR="/usr/lib/x86_64-linux-gnu/mariadb19/plugin" 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 -DPY_MARIADB_MAJOR_VERSION=1 -DPY_MARIADB_MINOR_VERSION=0 -DPY_MARIADB_PATCH_VERSION=3 -I/usr/include/mariadb -I/usr/include/mariadb/mysql -I./include -I/usr/include/python3.8 -c mariadb/mariadb_codecs.c -o build/temp.linux-x86_64-3.8/mariadb/mariadb_codecs.o
-DDEFAULT_PLUGINS_SUBDIR="/usr/lib/x86_64-linux-gnu/mariadb19/plugin" mariadb/mariadb_codecs.c: In function ‘mariadb_extended_field_type’: mariadb/mariadb_codecs.c:64:5: error: unknown type name ‘MARIADB_CONST_STRING’
64 | MARIADB_CONST_STRING str;
| ^~~~~~~~~~~~~~~~~~~~ mariadb/mariadb_codecs.c:66:10: warning: implicit declaration of function ‘mariadb_field_attr’ [-Wimplicit-function-declaration]
66 | if (!mariadb_field_attr(&str, field, MARIADB_FIELD_ATTR_FORMAT_NAME))
| ^~~~~~~~~~~~~~~~~~ mariadb/mariadb_codecs.c:66:42: error: ‘MARIADB_FIELD_ATTR_FORMAT_NAME’ undeclared (first use in this function)
66 | if (!mariadb_field_attr(&str, field, MARIADB_FIELD_ATTR_FORMAT_NAME))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mariadb/mariadb_codecs.c:66:42: note: each undeclared identifier is reported only once for each function it appears in mariadb/mariadb_codecs.c:68:14: error: request for member ‘length’ in something not a structure or union
68 | if (str.length == 4 && !strncmp(str.str, "json", 4))
| ^ mariadb/mariadb_codecs.c:68:42: error: request for member ‘str’ in something not a structure or union
68 | if (str.length == 4 && !strncmp(str.str, "json", 4))
| ^ error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
---------------------------------------- ERROR: Failed building wheel for mariadb Running setup.py clean for mariadb Failed to build mariadb
It seems that issue comes from:
mariadb/mariadb_codecs.c: In function ‘mariadb_extended_field_type’:
mariadb/mariadb_codecs.c:64:5: error: unknown type name ‘MARIADB_CONST_STRING’
But I'm not good in C and unable to investigate this right away.
Tried googling, but no results for issues caused by MARIADB_CONST_STRING type.
It is my first time installing mariadb connector for python on ubuntu.
Did anyone seen this error before? How should I proceed?
Appreciate your advise.
I went through more docs: https://mariadb.com/kb/en/installing-mariadb-deb-files/
What helped was:
curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash
Then again:
$ sudo apt-get update
$ sudo apt-get install libmariadb3
Now lets try to install Python mariadb lib:
$ pip3 install mariadb
Collecting mariadb
Using cached mariadb-1.0.3.tar.gz (66 kB)
Building wheels for collected packages: mariadb
Building wheel for mariadb (setup.py) ... done
Created wheel for mariadb: filename=mariadb-1.0.3-cp38-cp38-linux_x86_64.whl size=233300 sha256=607a788847d8d023a8921f7fc8fa9a5450b0e7f0625416de86d26cedfe202e73
Stored in directory: /home/sergey/.cache/pip/wheels/c5/56/1d/ade90f725a5f6a15b505bebc461ebfc573223e9836c5bf5603
Successfully built mariadb
Installing collected packages: mariadb
Successfully installed mariadb-1.0.3

How to install GDAL in Ubuntu?

I've got Ubuntu 17.04 version installed and I want to install GDAL. I have tried several ways to install it, but always I've got an error. I have installed Python 2.7 and Python 3.6 but I want to do the install for Python 2.7
I have tried to do the installation following these steps:
sudo apt-get install libgdal-dev export
CPLUS_INCLUDE_PATH=/usr/include/gdal export
C_INCLUDE_PATH=/usr/include/gdal pip install GDAL
And I've got this error:
Collecting GDAL
Using cached GDAL-2.2.3.tar.gz
Installing collected packages: GDAL
Running setup.py install for GDAL ... error
Complete output from command /usr/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-iebgcn_u/GDAL/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-x3vhb2t4-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
copying gdal.py -> build/lib.linux-x86_64-3.6
copying ogr.py -> build/lib.linux-x86_64-3.6
copying osr.py -> build/lib.linux-x86_64-3.6
copying gdalconst.py -> build/lib.linux-x86_64-3.6
copying gnm.py -> build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/osgeo
copying osgeo/gdal.py -> build/lib.linux-x86_64-3.6/osgeo
copying osgeo/gdal_array.py -> build/lib.linux-x86_64-3.6/osgeo
copying osgeo/osr.py -> build/lib.linux-x86_64-3.6/osgeo
copying osgeo/gdalconst.py -> build/lib.linux-x86_64-3.6/osgeo
copying osgeo/ogr.py -> build/lib.linux-x86_64-3.6/osgeo
copying osgeo/gnm.py -> build/lib.linux-x86_64-3.6/osgeo
copying osgeo/__init__.py -> build/lib.linux-x86_64-3.6/osgeo
copying osgeo/gdalnumeric.py -> build/lib.linux-x86_64-3.6/osgeo
Fixing build/lib.linux-x86_64-3.6/gdal.py build/lib.linux-x86_64-3.6/ogr.py build/lib.linux-x86_64-3.6/osr.py build/lib.linux-x86_64-3.6/gdalconst.py build/lib.linux-x86_64-3.6/gnm.py build/lib.linux-x86_64-3.6/osgeo/gdal.py build/lib.linux-x86_64-3.6/osgeo/gdal_array.py build/lib.linux-x86_64-3.6/osgeo/osr.py build/lib.linux-x86_64-3.6/osgeo/gdalconst.py build/lib.linux-x86_64-3.6/osgeo/ogr.py build/lib.linux-x86_64-3.6/osgeo/gnm.py build/lib.linux-x86_64-3.6/osgeo/__init__.py build/lib.linux-x86_64-3.6/osgeo/gdalnumeric.py
Skipping optional fixer: ws_comma
Fixing build/lib.linux-x86_64-3.6/gdal.py build/lib.linux-x86_64-3.6/ogr.py build/lib.linux-x86_64-3.6/osr.py build/lib.linux-x86_64-3.6/gdalconst.py build/lib.linux-x86_64-3.6/gnm.py build/lib.linux-x86_64-3.6/osgeo/gdal.py build/lib.linux-x86_64-3.6/osgeo/gdal_array.py build/lib.linux-x86_64-3.6/osgeo/osr.py build/lib.linux-x86_64-3.6/osgeo/gdalconst.py build/lib.linux-x86_64-3.6/osgeo/ogr.py build/lib.linux-x86_64-3.6/osgeo/gnm.py build/lib.linux-x86_64-3.6/osgeo/__init__.py build/lib.linux-x86_64-3.6/osgeo/gdalnumeric.py
Skipping optional fixer: ws_comma
running build_ext
building 'osgeo._gdal' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/extensions
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.6-sXpGnM/python3.6-3.6.3=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/usr/include/python3.6m -I. -I/usr/include -c extensions/gdal_wrap.cpp -o build/temp.linux-x86_64-3.6/extensions/gdal_wrap.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
x86_64-linux-gnu-g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -specs=/usr/share/dpkg/no-pie-link.specs -Wl,-z,relro -Wl,-Bsymbolic-functions -specs=/usr/share/dpkg/no-pie-link.specs -Wl,-z,relro -g -fdebug-prefix-map=/build/python3.6-sXpGnM/python3.6-3.6.3=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.6/extensions/gdal_wrap.o -L../../.libs -L../../ -lgdal -o build/lib.linux-x86_64-3.6/osgeo/_gdal.cpython-36m-x86_64-linux-gnu.so
building 'osgeo._gdalconst' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.6-sXpGnM/python3.6-3.6.3=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/usr/include/python3.6m -I. -I/usr/include -c extensions/gdalconst_wrap.c -o build/temp.linux-x86_64-3.6/extensions/gdalconst_wrap.o
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -specs=/usr/share/dpkg/no-pie-link.specs -Wl,-z,relro -Wl,-Bsymbolic-functions -specs=/usr/share/dpkg/no-pie-link.specs -Wl,-z,relro -g -fdebug-prefix-map=/build/python3.6-sXpGnM/python3.6-3.6.3=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.6/extensions/gdalconst_wrap.o -L../../.libs -L../../ -lgdal -o build/lib.linux-x86_64-3.6/osgeo/_gdalconst.cpython-36m-x86_64-linux-gnu.so
building 'osgeo._osr' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.6-sXpGnM/python3.6-3.6.3=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/usr/include/python3.6m -I. -I/usr/include -c extensions/osr_wrap.cpp -o build/temp.linux-x86_64-3.6/extensions/osr_wrap.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
extensions/osr_wrap.cpp:3339:13: warning: ‘void GDALPythonFreeCStr(void*, int)’ defined but not used [-Wunused-function]
static void GDALPythonFreeCStr(void* ptr, int bToFree)
^~~~~~~~~~~~~~~~~~
extensions/osr_wrap.cpp:3309:14: warning: ‘char* GDALPythonObjectToCStr(PyObject*, int*)’ defined but not used [-Wunused-function]
static char* GDALPythonObjectToCStr(PyObject* pyObject, int* pbToFree)
^~~~~~~~~~~~~~~~~~~~~~
x86_64-linux-gnu-g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -specs=/usr/share/dpkg/no-pie-link.specs -Wl,-z,relro -Wl,-Bsymbolic-functions -specs=/usr/share/dpkg/no-pie-link.specs -Wl,-z,relro -g -fdebug-prefix-map=/build/python3.6-sXpGnM/python3.6-3.6.3=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.6/extensions/osr_wrap.o -L../../.libs -L../../ -lgdal -o build/lib.linux-x86_64-3.6/osgeo/_osr.cpython-36m-x86_64-linux-gnu.so
building 'osgeo._ogr' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.6-sXpGnM/python3.6-3.6.3=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/usr/include/python3.6m -I. -I/usr/include -c extensions/ogr_wrap.cpp -o build/temp.linux-x86_64-3.6/extensions/ogr_wrap.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
x86_64-linux-gnu-g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -specs=/usr/share/dpkg/no-pie-link.specs -Wl,-z,relro -Wl,-Bsymbolic-functions -specs=/usr/share/dpkg/no-pie-link.specs -Wl,-z,relro -g -fdebug-prefix-map=/build/python3.6-sXpGnM/python3.6-3.6.3=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.6/extensions/ogr_wrap.o -L../../.libs -L../../ -lgdal -o build/lib.linux-x86_64-3.6/osgeo/_ogr.cpython-36m-x86_64-linux-gnu.so
building 'osgeo._gnm' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.6-sXpGnM/python3.6-3.6.3=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/usr/include/python3.6m -I. -I/usr/include -c extensions/gnm_wrap.cpp -o build/temp.linux-x86_64-3.6/extensions/gnm_wrap.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
extensions/gnm_wrap.cpp:3321:13: warning: ‘void GDALPythonFreeCStr(void*, int)’ defined but not used [-Wunused-function]
static void GDALPythonFreeCStr(void* ptr, int bToFree)
^~~~~~~~~~~~~~~~~~
extensions/gnm_wrap.cpp:3291:14: warning: ‘char* GDALPythonObjectToCStr(PyObject*, int*)’ defined but not used [-Wunused-function]
static char* GDALPythonObjectToCStr(PyObject* pyObject, int* pbToFree)
^~~~~~~~~~~~~~~~~~~~~~
x86_64-linux-gnu-g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -specs=/usr/share/dpkg/no-pie-link.specs -Wl,-z,relro -Wl,-Bsymbolic-functions -specs=/usr/share/dpkg/no-pie-link.specs -Wl,-z,relro -g -fdebug-prefix-map=/build/python3.6-sXpGnM/python3.6-3.6.3=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.6/extensions/gnm_wrap.o -L../../.libs -L../../ -lgdal -o build/lib.linux-x86_64-3.6/osgeo/_gnm.cpython-36m-x86_64-linux-gnu.so
running install_lib
copying build/lib.linux-x86_64-3.6/gdal.py -> /usr/local/lib/python3.6/dist-packages
error: could not create '/usr/local/lib/python3.6/dist-packages/gdal.py': Permission denied
----------------------------------------
Command "/usr/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-iebgcn_u/GDAL/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-x3vhb2t4-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-iebgcn_u/GDAL/
If I execute the last command withs sudo: sudo pip install GDAL. I've got this another error ...
The directory '/home/josecarlos/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. The directory '/home/josecarlos/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. Collecting GDAL Downloading GDAL-2.2.3.tar.gz (475kB)
100% |████████████████████████████████| 481kB 1.3MB/s Installing collected packages: GDAL Running setup.py install for GDAL ... error
Complete output from command /usr/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-0rp6w4f8/GDAL/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-w7crvfsd-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
copying gdal.py -> build/lib.linux-x86_64-3.6
copying ogr.py -> build/lib.linux-x86_64-3.6
copying osr.py -> build/lib.linux-x86_64-3.6
copying gdalconst.py -> build/lib.linux-x86_64-3.6
copying gnm.py -> build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/osgeo
copying osgeo/gdal.py -> build/lib.linux-x86_64-3.6/osgeo
copying osgeo/gdal_array.py -> build/lib.linux-x86_64-3.6/osgeo
copying osgeo/osr.py -> build/lib.linux-x86_64-3.6/osgeo
copying osgeo/gdalconst.py -> build/lib.linux-x86_64-3.6/osgeo
copying osgeo/ogr.py -> build/lib.linux-x86_64-3.6/osgeo
copying osgeo/gnm.py -> build/lib.linux-x86_64-3.6/osgeo
copying osgeo/__init__.py -> build/lib.linux-x86_64-3.6/osgeo
copying osgeo/gdalnumeric.py -> build/lib.linux-x86_64-3.6/osgeo
Fixing build/lib.linux-x86_64-3.6/gdal.py build/lib.linux-x86_64-3.6/ogr.py build/lib.linux-x86_64-3.6/osr.py build/lib.linux-x86_64-3.6/gdalconst.py build/lib.linux-x86_64-3.6/gnm.py build/lib.linux-x86_64-3.6/osgeo/gdal.py build/lib.linux-x86_64-3.6/osgeo/gdal_array.py build/lib.linux-x86_64-3.6/osgeo/osr.py build/lib.linux-x86_64-3.6/osgeo/gdalconst.py build/lib.linux-x86_64-3.6/osgeo/ogr.py build/lib.linux-x86_64-3.6/osgeo/gnm.py build/lib.linux-x86_64-3.6/osgeo/__init__.py build/lib.linux-x86_64-3.6/osgeo/gdalnumeric.py
Skipping optional fixer: ws_comma
Fixing build/lib.linux-x86_64-3.6/gdal.py build/lib.linux-x86_64-3.6/ogr.py build/lib.linux-x86_64-3.6/osr.py build/lib.linux-x86_64-3.6/gdalconst.py build/lib.linux-x86_64-3.6/gnm.py build/lib.linux-x86_64-3.6/osgeo/gdal.py build/lib.linux-x86_64-3.6/osgeo/gdal_array.py build/lib.linux-x86_64-3.6/osgeo/osr.py build/lib.linux-x86_64-3.6/osgeo/gdalconst.py build/lib.linux-x86_64-3.6/osgeo/ogr.py build/lib.linux-x86_64-3.6/osgeo/gnm.py build/lib.linux-x86_64-3.6/osgeo/__init__.py build/lib.linux-x86_64-3.6/osgeo/gdalnumeric.py
Skipping optional fixer: ws_comma
running build_ext
building 'osgeo._gdal' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/extensions
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.6-sXpGnM/python3.6-3.6.3=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/usr/include/python3.6m -I. -I/usr/include -c extensions/gdal_wrap.cpp -o build/temp.linux-x86_64-3.6/extensions/gdal_wrap.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
extensions/gdal_wrap.cpp:3168:10: fatal error: cpl_port.h: No existe el archivo o el directorio
#include "cpl_port.h"
^~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
---------------------------------------- Command "/usr/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-0rp6w4f8/GDAL/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-w7crvfsd-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-0rp6w4f8/GDAL/
How can I install GDAL in Ubuntu?
maybe you'll have more choices if you download the package and read the readme.txt.
downloadpage
im not that confident with all those command parameters on my own.
hope it helps^^
Maybe the problem is the Ubuntu version more than Python. I didn't find much information about ubuntu 17, so you should try what is available for the older and more stable versions.
I have Ubuntu 18.04 and this answer seems to help her, too. According to comments it also worked on Ubuntu 16.04 and 14.04:
If you don't have any gdal previous version installed
Open your terminal and type
sudo add-apt-repository -y ppa:ubuntugis/ppa
sudo apt update
sudo apt install gdal-bin python-gdal python3-gdal
If you have a previous version installed
Open your terminal and type
sudo add-apt-repository -y ppa:ubuntugis/ppa
sudo apt update
sudo apt upgrade

Python old version of Cython even when newer version installed

I installed Cython 0.24.1 on my Raspberry Pi by doing this:
Pasted below is the command and terminal output.
pi#raspberrypi:~ $ sudo pip3 install --upgrade cython==0.24.1
Downloading/unpacking cython==0.24.1
Downloading Cython-0.24.1.tar.gz (1.7MB): 1.7MB downloaded
Running setup.py (path:/tmp/pip-build-hprgsgiw/cython/setup.py) egg_info for package cython
Unable to find pgen, not compiling formal grammar.
warning: no files found matching '*.pyx' under directory 'Cython/Debugger/Tests'
warning: no files found matching '*.pxd' under directory 'Cython/Debugger/Tests'
warning: no files found matching '*.h' under directory 'Cython/Debugger/Tests'
warning: no files found matching '*.pxd' under directory 'Cython/Utility'
Installing collected packages: cython
Running setup.py install for cython
Unable to find pgen, not compiling formal grammar.
cythoning /tmp/pip-build-hprgsgiw/cython/Cython/Plex/Scanners.py to /tmp/pip-build-hprgsgiw/cython/Cython/Plex/Scanners.c
building 'Cython.Plex.Scanners' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.4m -c /tmp/pip-build-hprgsgiw/cython/Cython/Plex/Scanners.c -o build/temp.linux-armv7l-3.4/tmp/pip-build-hprgsgiw/cython/Cython/Plex/Scanners.o
arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 build/temp.linux-armv7l-3.4/tmp/pip-build-hprgsgiw/cython/Cython/Plex/Scanners.o -o build/lib.linux-armv7l-3.4/Cython/Plex/Scanners.cpython-34m.so
cythoning /tmp/pip-build-hprgsgiw/cython/Cython/Plex/Actions.py to /tmp/pip-build-hprgsgiw/cython/Cython/Plex/Actions.c
building 'Cython.Plex.Actions' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.4m -c /tmp/pip-build-hprgsgiw/cython/Cython/Plex/Actions.c -o build/temp.linux-armv7l-3.4/tmp/pip-build-hprgsgiw/cython/Cython/Plex/Actions.o
arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 build/temp.linux-armv7l-3.4/tmp/pip-build-hprgsgiw/cython/Cython/Plex/Actions.o -o build/lib.linux-armv7l-3.4/Cython/Plex/Actions.cpython-34m.so
cythoning /tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Lexicon.py to /tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Lexicon.c
building 'Cython.Compiler.Lexicon' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.4m -c /tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Lexicon.c -o build/temp.linux-armv7l-3.4/tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Lexicon.o
arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 build/temp.linux-armv7l-3.4/tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Lexicon.o -o build/lib.linux-armv7l-3.4/Cython/Compiler/Lexicon.cpython-34m.so
cythoning /tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Scanning.py to /tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Scanning.c
building 'Cython.Compiler.Scanning' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.4m -c /tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Scanning.c -o build/temp.linux-armv7l-3.4/tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Scanning.o
arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 build/temp.linux-armv7l-3.4/tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Scanning.o -o build/lib.linux-armv7l-3.4/Cython/Compiler/Scanning.cpython-34m.so
cythoning /tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Parsing.py to /tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Parsing.c
building 'Cython.Compiler.Parsing' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.4m -c /tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Parsing.c -o build/temp.linux-armv7l-3.4/tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Parsing.o
arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 build/temp.linux-armv7l-3.4/tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Parsing.o -o build/lib.linux-armv7l-3.4/Cython/Compiler/Parsing.cpython-34m.so
cythoning /tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Visitor.py to /tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Visitor.c
building 'Cython.Compiler.Visitor' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.4m -c /tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Visitor.c -o build/temp.linux-armv7l-3.4/tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Visitor.o
arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 build/temp.linux-armv7l-3.4/tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Visitor.o -o build/lib.linux-armv7l-3.4/Cython/Compiler/Visitor.cpython-34m.so
cythoning /tmp/pip-build-hprgsgiw/cython/Cython/Compiler/FlowControl.py to /tmp/pip-build-hprgsgiw/cython/Cython/Compiler/FlowControl.c
building 'Cython.Compiler.FlowControl' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.4m -c /tmp/pip-build-hprgsgiw/cython/Cython/Compiler/FlowControl.c -o build/temp.linux-armv7l-3.4/tmp/pip-build-hprgsgiw/cython/Cython/Compiler/FlowControl.o
arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 build/temp.linux-armv7l-3.4/tmp/pip-build-hprgsgiw/cython/Cython/Compiler/FlowControl.o -o build/lib.linux-armv7l-3.4/Cython/Compiler/FlowControl.cpython-34m.so
cythoning /tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Code.py to /tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Code.c
building 'Cython.Compiler.Code' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.4m -c /tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Code.c -o build/temp.linux-armv7l-3.4/tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Code.o
arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 build/temp.linux-armv7l-3.4/tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Code.o -o build/lib.linux-armv7l-3.4/Cython/Compiler/Code.cpython-34m.so
cythoning /tmp/pip-build-hprgsgiw/cython/Cython/Runtime/refnanny.pyx to /tmp/pip-build-hprgsgiw/cython/Cython/Runtime/refnanny.c
building 'Cython.Runtime.refnanny' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.4m -c /tmp/pip-build-hprgsgiw/cython/Cython/Runtime/refnanny.c -o build/temp.linux-armv7l-3.4/tmp/pip-build-hprgsgiw/cython/Cython/Runtime/refnanny.o
arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 build/temp.linux-armv7l-3.4/tmp/pip-build-hprgsgiw/cython/Cython/Runtime/refnanny.o -o build/lib.linux-armv7l-3.4/Cython/Runtime/refnanny.cpython-34m.so
cythoning /tmp/pip-build-hprgsgiw/cython/Cython/Tempita/_tempita.py to /tmp/pip-build-hprgsgiw/cython/Cython/Tempita/_tempita.c
building 'Cython.Tempita._tempita' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.4m -c /tmp/pip-build-hprgsgiw/cython/Cython/Tempita/_tempita.c -o build/temp.linux-armv7l-3.4/tmp/pip-build-hprgsgiw/cython/Cython/Tempita/_tempita.o
arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 build/temp.linux-armv7l-3.4/tmp/pip-build-hprgsgiw/cython/Cython/Tempita/_tempita.o -o build/lib.linux-armv7l-3.4/Cython/Tempita/_tempita.cpython-34m.so
warning: no files found matching '*.pyx' under directory 'Cython/Debugger/Tests'
warning: no files found matching '*.pxd' under directory 'Cython/Debugger/Tests'
warning: no files found matching '*.h' under directory 'Cython/Debugger/Tests'
warning: no files found matching '*.pxd' under directory 'Cython/Utility'
Installing cygdb script to /usr/local/bin
Installing cython script to /usr/local/bin
Installing cythonize script to /usr/local/bin
Successfully installed cython
Cleaning up...
Looks like the installation has completed fine. But after this, if I do the following, it still return the old version. What am I missing?
pi#raspberrypi:~ $ python3 -c "import cython;print(cython.__version__)"
0.21.1
From the log, I can read Installing cython script to /usr/local/bin. I extrapolate that the library has installed in /usr/local/python3something. Two alternatives:
re-install using pip3 install --user --upgrade cython==0.24.1 and make sure that ~/.local/bin is in your PATH environment variable.
add /usr/local/bin to your PATH environment variable and /usr/local/python3something/site-packages to your LD_LIBRARY_PATH environment variable.
Indeed, the python3something part must be changed to reflect the exact path on your system. Option "1" above should work even if my extrapolation is wrong.

./zbarmodule.h:26:10: fatal error: 'zbar.h' file not found

I was trying to install zbar on my Macbook.
When I execute command pip install zbar (after brew install zbar) Exception is thrown as below:
Collecting zbar
Using cached zbar-0.10.tar.bz2
Installing collected packages: zbar
Running setup.py install for zbar
building 'zbar' extension
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c zbarmodule.c -o build/temp.macosx-10.11-intel-2.7/zbarmodule.o
In file included from zbarmodule.c:24:
./zbarmodule.h:26:10: fatal error: 'zbar.h' file not found
#include <zbar.h>
^
1 error generated.
error: command 'cc' failed with exit status 1
Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/var/folders/hx/jbnxkn396zs34xn3fv10tjf40000gn/T/pip-build-PlQauK/zbar/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/hx/jbnxkn396zs34xn3fv10tjf40000gn/T/pip-0yRA4D-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
building 'zbar' extension
creating build
creating build/temp.macosx-10.11-intel-2.7
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c zbarmodule.c -o build/temp.macosx-10.11-intel-2.7/zbarmodule.o
In file included from zbarmodule.c:24:
./zbarmodule.h:26:10: fatal error: 'zbar.h' file not found
#include <zbar.h>
^
1 error generated.
error: command 'cc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/var/folders/hx/jbnxkn396zs34xn3fv10tjf40000gn/T/pip-build-PlQauK/zbar/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/hx/jbnxkn396zs34xn3fv10tjf40000gn/T/pip-0yRA4D-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /var/folders/hx/jbnxkn396zs34xn3fv10tjf40000gn/T/pip-build-PlQauK/zbar
There is a similar question, However the answers are not helpful in my case.
I also tried another way to install according to this link
However the same error occurred when I type python setup.py install
running install
running build
running build_ext
building 'zbar' extension
creating build
creating build/temp.macosx-10.11-intel-2.7
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c zbarmodule.c -o build/temp.macosx-10.11-intel-2.7/zbarmodule.o
In file included from zbarmodule.c:24:
./zbarmodule.h:26:10: fatal error: 'zbar.h' file not found
#include <zbar.h>
^
1 error generated.
error: command 'cc' failed with exit status 1
I had the same problem, and I run conda install zbar, after that, the error disappeared.

Categories

Resources