pip install fails in virtualenv while succeeds outside the virtualenv - python

We've installed virtualenv on centos, based on python 2.7.
pip install succeeds for most libs, but trying to pip install python-ldap for example - fails. This happens even though same pip install outside the virtualenv succeeded.
We run CentOS 7.
(py2.7) ramia#vd-ramia:~$ pip install python-ldap==2.4.15
Collecting python-ldap==2.4.15
/home/ramia/envs/py2.7/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
SNIMissingWarning
/home/ramia/envs/py2.7/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Using cached python-ldap-2.4.15.tar.gz
Requirement already satisfied (use --upgrade to upgrade): setuptools in /home/ramia/envs/py2.7/lib/python2.7/site-packages (from python-ldap==2.4.15)
Building wheels for collected packages: python-ldap
Running setup.py bdist_wheel for python-ldap ... error
Complete output from command /home/ramia/envs/py2.7/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-49710t/python-ldap/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmpY1tbnWpip-wheel- --python-tag cp27:
defines: HAVE_SASL HAVE_TLS HAVE_LIBLDAP_R
extra_compile_args:
extra_objects:
include_dirs: /opt/openldap-RE24/include /usr/include/sasl /usr/include
library_dirs: /opt/openldap-RE24/lib /usr/lib
libs: ldap_r
running bdist_wheel
running build
running build_py
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/controls.py (for module ldap.controls) not found
file Lib/ldap/extop.py (for module ldap.extop) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
creating build
creating build/lib.linux-x86_64-2.7
copying Lib/ldapurl.py -> build/lib.linux-x86_64-2.7
copying Lib/ldif.py -> build/lib.linux-x86_64-2.7
copying Lib/dsml.py -> build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/ldap
copying Lib/ldap/__init__.py -> build/lib.linux-x86_64-2.7/ldap
copying Lib/ldap/async.py -> build/lib.linux-x86_64-2.7/ldap
creating build/lib.linux-x86_64-2.7/ldap/controls
copying Lib/ldap/controls/__init__.py -> build/lib.linux-x86_64-2.7/ldap/controls
copying Lib/ldap/controls/libldap.py -> build/lib.linux-x86_64-2.7/ldap/controls
copying Lib/ldap/controls/openldap.py -> build/lib.linux-x86_64-2.7/ldap/controls
copying Lib/ldap/controls/ppolicy.py -> build/lib.linux-x86_64-2.7/ldap/controls
copying Lib/ldap/controls/psearch.py -> build/lib.linux-x86_64-2.7/ldap/controls
copying Lib/ldap/controls/pwdpolicy.py -> build/lib.linux-x86_64-2.7/ldap/controls
copying Lib/ldap/controls/readentry.py -> build/lib.linux-x86_64-2.7/ldap/controls
copying Lib/ldap/controls/sessiontrack.py -> build/lib.linux-x86_64-2.7/ldap/controls
copying Lib/ldap/controls/simple.py -> build/lib.linux-x86_64-2.7/ldap/controls
copying Lib/ldap/cidict.py -> build/lib.linux-x86_64-2.7/ldap
copying Lib/ldap/dn.py -> build/lib.linux-x86_64-2.7/ldap
creating build/lib.linux-x86_64-2.7/ldap/extop
copying Lib/ldap/extop/__init__.py -> build/lib.linux-x86_64-2.7/ldap/extop
copying Lib/ldap/extop/dds.py -> build/lib.linux-x86_64-2.7/ldap/extop
copying Lib/ldap/filter.py -> build/lib.linux-x86_64-2.7/ldap
copying Lib/ldap/functions.py -> build/lib.linux-x86_64-2.7/ldap
copying Lib/ldap/ldapobject.py -> build/lib.linux-x86_64-2.7/ldap
copying Lib/ldap/logger.py -> build/lib.linux-x86_64-2.7/ldap
copying Lib/ldap/modlist.py -> build/lib.linux-x86_64-2.7/ldap
copying Lib/ldap/resiter.py -> build/lib.linux-x86_64-2.7/ldap
copying Lib/ldap/sasl.py -> build/lib.linux-x86_64-2.7/ldap
creating build/lib.linux-x86_64-2.7/ldap/schema
copying Lib/ldap/schema/__init__.py -> build/lib.linux-x86_64-2.7/ldap/schema
copying Lib/ldap/schema/models.py -> build/lib.linux-x86_64-2.7/ldap/schema
copying Lib/ldap/schema/subentry.py -> build/lib.linux-x86_64-2.7/ldap/schema
copying Lib/ldap/schema/tokenizer.py -> build/lib.linux-x86_64-2.7/ldap/schema
copying Lib/ldap/syncrepl.py -> build/lib.linux-x86_64-2.7/ldap
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/controls.py (for module ldap.controls) not found
file Lib/ldap/extop.py (for module ldap.extop) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
running egg_info
creating Lib/python_ldap.egg-info
writing requirements to Lib/python_ldap.egg-info/requires.txt
writing Lib/python_ldap.egg-info/PKG-INFO
writing top-level names to Lib/python_ldap.egg-info/top_level.txt
writing dependency_links to Lib/python_ldap.egg-info/dependency_links.txt
writing manifest file 'Lib/python_ldap.egg-info/SOURCES.txt'
warning: manifest_maker: standard file '-c' not found
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/controls.py (for module ldap.controls) not found
file Lib/ldap/extop.py (for module ldap.extop) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
reading manifest file 'Lib/python_ldap.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'Makefile'
warning: no files found matching 'Modules/LICENSE'
writing manifest file 'Lib/python_ldap.egg-info/SOURCES.txt'
running build_ext
building '_ldap' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/Modules
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 -DHAVE_SASL -DHAVE_TLS -DHAVE_LIBLDAP_R -DHAVE_LIBLDAP_R -DLDAPMODULE_VERSION=2.4.15 -IModules -I/opt/openldap-RE24/include -I/usr/include/sasl -I/usr/include -I/usr/include/python2.7 -c Modules/LDAPObject.c -o build/temp.linux-x86_64-2.7/Modules/LDAPObject.o
In file included from Modules/LDAPObject.c:9:0:
Modules/errors.h:8:18: fatal error: lber.h: No such file or directory
#include "lber.h"
^
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Failed building wheel for python-ldap
Running setup.py clean for python-ldap
Failed to build python-ldap
Installing collected packages: python-ldap
Running setup.py install for python-ldap ... error
Complete output from command /home/ramia/envs/py2.7/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-49710t/python-ldap/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-fsuT_N-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/ramia/envs/py2.7/include/site/python2.7/python-ldap:
defines: HAVE_SASL HAVE_TLS HAVE_LIBLDAP_R
extra_compile_args:
extra_objects:
include_dirs: /opt/openldap-RE24/include /usr/include/sasl /usr/include
library_dirs: /opt/openldap-RE24/lib /usr/lib
libs: ldap_r
running install
running build
running build_py
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/controls.py (for module ldap.controls) not found
file Lib/ldap/extop.py (for module ldap.extop) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
creating build
creating build/lib.linux-x86_64-2.7
copying Lib/ldapurl.py -> build/lib.linux-x86_64-2.7
copying Lib/ldif.py -> build/lib.linux-x86_64-2.7
copying Lib/dsml.py -> build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/ldap
copying Lib/ldap/__init__.py -> build/lib.linux-x86_64-2.7/ldap
copying Lib/ldap/async.py -> build/lib.linux-x86_64-2.7/ldap
creating build/lib.linux-x86_64-2.7/ldap/controls
copying Lib/ldap/controls/__init__.py -> build/lib.linux-x86_64-2.7/ldap/controls
copying Lib/ldap/controls/libldap.py -> build/lib.linux-x86_64-2.7/ldap/controls
copying Lib/ldap/controls/openldap.py -> build/lib.linux-x86_64-2.7/ldap/controls
copying Lib/ldap/controls/ppolicy.py -> build/lib.linux-x86_64-2.7/ldap/controls
copying Lib/ldap/controls/psearch.py -> build/lib.linux-x86_64-2.7/ldap/controls
copying Lib/ldap/controls/pwdpolicy.py -> build/lib.linux-x86_64-2.7/ldap/controls
copying Lib/ldap/controls/readentry.py -> build/lib.linux-x86_64-2.7/ldap/controls
copying Lib/ldap/controls/sessiontrack.py -> build/lib.linux-x86_64-2.7/ldap/controls
copying Lib/ldap/controls/simple.py -> build/lib.linux-x86_64-2.7/ldap/controls
copying Lib/ldap/cidict.py -> build/lib.linux-x86_64-2.7/ldap
copying Lib/ldap/dn.py -> build/lib.linux-x86_64-2.7/ldap
creating build/lib.linux-x86_64-2.7/ldap/extop
copying Lib/ldap/extop/__init__.py -> build/lib.linux-x86_64-2.7/ldap/extop
copying Lib/ldap/extop/dds.py -> build/lib.linux-x86_64-2.7/ldap/extop
copying Lib/ldap/filter.py -> build/lib.linux-x86_64-2.7/ldap
copying Lib/ldap/functions.py -> build/lib.linux-x86_64-2.7/ldap
copying Lib/ldap/ldapobject.py -> build/lib.linux-x86_64-2.7/ldap
copying Lib/ldap/logger.py -> build/lib.linux-x86_64-2.7/ldap
copying Lib/ldap/modlist.py -> build/lib.linux-x86_64-2.7/ldap
copying Lib/ldap/resiter.py -> build/lib.linux-x86_64-2.7/ldap
copying Lib/ldap/sasl.py -> build/lib.linux-x86_64-2.7/ldap
creating build/lib.linux-x86_64-2.7/ldap/schema
copying Lib/ldap/schema/__init__.py -> build/lib.linux-x86_64-2.7/ldap/schema
copying Lib/ldap/schema/models.py -> build/lib.linux-x86_64-2.7/ldap/schema
copying Lib/ldap/schema/subentry.py -> build/lib.linux-x86_64-2.7/ldap/schema
copying Lib/ldap/schema/tokenizer.py -> build/lib.linux-x86_64-2.7/ldap/schema
copying Lib/ldap/syncrepl.py -> build/lib.linux-x86_64-2.7/ldap
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/controls.py (for module ldap.controls) not found
file Lib/ldap/extop.py (for module ldap.extop) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
running egg_info
writing requirements to Lib/python_ldap.egg-info/requires.txt
writing Lib/python_ldap.egg-info/PKG-INFO
writing top-level names to Lib/python_ldap.egg-info/top_level.txt
writing dependency_links to Lib/python_ldap.egg-info/dependency_links.txt
warning: manifest_maker: standard file '-c' not found
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/controls.py (for module ldap.controls) not found
file Lib/ldap/extop.py (for module ldap.extop) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
reading manifest file 'Lib/python_ldap.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'Makefile'
warning: no files found matching 'Modules/LICENSE'
writing manifest file 'Lib/python_ldap.egg-info/SOURCES.txt'
running build_ext
building '_ldap' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/Modules
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 -DHAVE_SASL -DHAVE_TLS -DHAVE_LIBLDAP_R -DHAVE_LIBLDAP_R -DLDAPMODULE_VERSION=2.4.15 -IModules -I/opt/openldap-RE24/include -I/usr/include/sasl -I/usr/include -I/usr/include/python2.7 -c Modules/LDAPObject.c -o build/temp.linux-x86_64-2.7/Modules/LDAPObject.o
In file included from Modules/LDAPObject.c:9:0:
Modules/errors.h:8:18: fatal error: lber.h: No such file or directory
#include "lber.h"
^
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/home/ramia/envs/py2.7/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-49710t/python-ldap/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-fsuT_N-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/ramia/envs/py2.7/include/site/python2.7/python-ldap" failed with error code 1 in /tmp/pip-build-49710t/python-ldap/
Any ideas?
Thank you

It turns out that upgrading the Centos version to CentOS Linux release 7.1.1503 (Core) solved the issue.
Cheers

Related

ERROR: MySQL_python-1.2.5-cp27-none-win_amd64.whl is not a supported wheel on this platform

So I am setting up an old project it's Python 2 and Django 1 where I'm stuck with the installation of requirement.txt. This is the main error I'm getting while installing
Building wheel for MySQL-python (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/rehman/projects/cjs/bin/python2 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-KyvPG6/MySQL-python/setup.py'"'"'; __file__='"'"'/tmp/pip-install-KyvPG6/MySQL-python/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-jCT7NK
cwd: /tmp/pip-install-KyvPG6/MySQL-python/
Complete output (38 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying _mysql_exceptions.py -> build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/__init__.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/converters.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/connections.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/cursors.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/release.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/times.py -> build/lib.linux-x86_64-2.7/MySQLdb
creating build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/__init__.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/REFRESH.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
running build_ext
building '_mysql' extension
creating build/temp.linux-x86_64-2.7
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-2.7.16=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 -I/usr/include/mariadb -I/usr/include/mariadb/mysql -I/usr/include/python2.7 -c _mysql.c -o build/temp.linux-x86_64-2.7/_mysql.o
In file included from _mysql.c:44:
/usr/include/mariadb/my_config.h:3:2: warning: #warning This file should not be included by clients, include only <mysql.h> [-Wcpp]
#warning This file should not be included by clients, include only <mysql.h>
^~~~~~~
In file included from _mysql.c:46:
/usr/include/mariadb/mysql.h:444:3: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
MYSQL_CLIENT_PLUGIN_HEADER
^~~~~~~~~~~~~~~~~~~~~~~~~~
_mysql.c: In function ‘_mysql_ConnectionObject_ping’:
_mysql.c:2005:41: error: ‘MYSQL’ {aka ‘struct st_mysql’} has no member named ‘reconnect’
if ( reconnect != -1 ) self->connection.reconnect = reconnect;
^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for MySQL-python
Running setup.py clean for MySQL-python
Building wheel for torctl (setup.py) ... done
Created wheel for torctl: filename=torctl-0.2-py2-none-any.whl size=67317 sha256=3cfc42c3313ca9a9b220dc844f65156a0134bb5c7f63dba0327fefe57fb64705
Stored in directory: /tmp/pip-ephem-wheel-cache-M4548v/wheels/c4/3a/87/1d604378e37b4c4d4c07b26c7866955102de8d824553cec0ec
Successfully built torctl
Failed to build MySQL-python
Installing collected packages: Django, pycrypto, six, ecdsa, paramiko, Fabric, GeoIP, Markdown, MySQL-python, Pillow, Unidecode, amqp, anyjson, beautifulsoup4, billiard, pytz, kombu, celery, colorama, configobj, django-celery, django-filter, django-mailchimp-v1.3, djangorestframework, httplib2, uritemplate, pyasn1, rsa, pyasn1-modules, oauth2client, google-api-python-client, html5lib, meld3, mysql-connector, oauth2, python-Levenshtein, python-dateutil, redis, requests, stripe, supervisor, urllib3, vine, pyyaml, ua-parser, user-agents, django-user-agents, contextlib2, raven, enum34, ipaddress, pycparser, cffi, cryptography, PyOpenSSL, ndg-httpsclient, pycryptodomex, future, pyjwkest, python-openid, oauthlib, requests-oauthlib, PyJWT, social-auth-core, social-auth-app-django, django-js-asset, django-ckeditor, django-compat, django-hijack, django-hijack-admin, torctl
Running setup.py install for MySQL-python ... error
ERROR: Command errored out with exit status 1:
command: /home/rehman/projects/cjs/bin/python2 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-KyvPG6/MySQL-python/setup.py'"'"'; __file__='"'"'/tmp/pip-install-KyvPG6/MySQL-python/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-nSvXLQ/install-record.txt --single-version-externally-managed --compile --install-headers /home/rehman/projects/cjs/include/site/python2.7/MySQL-python
cwd: /tmp/pip-install-KyvPG6/MySQL-python/
Complete output (38 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying _mysql_exceptions.py -> build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/__init__.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/converters.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/connections.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/cursors.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/release.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/times.py -> build/lib.linux-x86_64-2.7/MySQLdb
creating build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/__init__.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/REFRESH.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
running build_ext
building '_mysql' extension
creating build/temp.linux-x86_64-2.7
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-2.7.16=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 -I/usr/include/mariadb -I/usr/include/mariadb/mysql -I/usr/include/python2.7 -c _mysql.c -o build/temp.linux-x86_64-2.7/_mysql.o
In file included from _mysql.c:44:
/usr/include/mariadb/my_config.h:3:2: warning: #warning This file should not be included by clients, include only <mysql.h> [-Wcpp]
#warning This file should not be included by clients, include only <mysql.h>
^~~~~~~
In file included from _mysql.c:46:
/usr/include/mariadb/mysql.h:444:3: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
MYSQL_CLIENT_PLUGIN_HEADER
^~~~~~~~~~~~~~~~~~~~~~~~~~
_mysql.c: In function ‘_mysql_ConnectionObject_ping’:
_mysql.c:2005:41: error: ‘MYSQL’ {aka ‘struct st_mysql’} has no member named ‘reconnect’
if ( reconnect != -1 ) self->connection.reconnect = reconnect;
^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /home/rehman/projects/comparedjs/bin/python2 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-KyvPG6/MySQL-python/setup.py'"'"'; __file__='"'"'/tmp/pip-install-KyvPG6/MySQL-python/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-nSvXLQ/install-record.txt --single-version-externally-managed --compile --install-headers /home/rehman/projects/cjs/include/site/python2.7/MySQL-python Check the logs for full command output.
This is requirement.txt
Django==1.9.7
Fabric==1.11.1
GeoIP==1.3.2
Markdown==2.6.6
MySQL-python==1.2.5
Pillow==3.3.0
Unidecode==0.04.19
amqp==1.4.9
anyjson==0.3.3
argparse==1.2.1
beautifulsoup4==4.2.1
billiard==3.3.0.22
celery==3.1.18
colorama==0.2.5
configobj
django-celery==3.1.17
django-filter==0.13.0
django-mailchimp-v1.3==1.4.0
djangorestframework==3.4.1
google-api-python-client==1.6.2
html5lib==0.999
httplib2==0.10.3
kombu==3.0.37
#newspaper == 0.1.0.7
meld3==1.0.2
mysql-connector
oauth2
oauth2client
#pyinotify
#pyserial
python-Levenshtein
python-dateutil
redis
requests==2.9.1
six==1.10.0
#ssh-import-id
stripe==1.46.0
supervisor==3.2.1
git+https://github.com/aaronsw/pytorctl.git
uritemplate==3.0.0
urllib3==1.7.1
vine==1.1.3
wsgiref==0.1.2
#zope.interface==4.0.5
pyyaml
ua-parser
user-agents
django-user-agents
raven
pyasn1
ndg-httpsclient
pyjwkest
social-auth-app-django
social-auth-core
django-ckeditor==5.4.0
django-hijack
django-hijack-admin
What I searched and got a clue that its somewhat related to the wheel, it's causing the issue and by this link I get to know that I need to download a .whl file and extract it manually for MySQL-python so I found 2 files through this link and when I try to execute .whl file by pip install MySQL_python-1.2.5-cp27-none-win32.whl it's giving me error ERROR: MySQL_python-1.2.5-cp27-none-win_amd64.whl is not a supported wheel on this platform.
I eventually figured out its for Windows platform. So if mysql-python is for Windows platform what do I install for Linux? I am using Debian 10.
Simply install mysqlclient instead of MySQL-python, it's a drop-in replacement that's more maintained.

How to include Python Pillow as Homebrew formula requisite?

I used to use Homebrew tap formulas to distribute my self maintained programs. However, it is imposible for me to do with some programs which use Pillow, because Homebrew fails when try to install it isolate.
Example of a recipe which uses Pillow:
class Monoshape < Formula
include Language::Python::Virtualenv
desc "Extracts monochromatic shapes"
homepage "https://github.com/GlezSeoane/monoshape"
url "https://github.com/GlezSeoane/monoshape/archive/v1.0.tar.gz"
sha256 "6edbecfc60db6f91fba6e520769f811009743eec89d655c54e4e6006ad5b0dbb"
depends_on "python"
resource "filetype" do
url "https://files.pythonhosted.org/packages/e8/53/298887541ae479f8467d4d23e028c6d15f9811da25c582297fd3869666b7/filetype-1.0.5.tar.gz"
sha256 "17a3b885f19034da29640b083d767e0f13c2dcb5dcc267945c8b6e5a5a9013c7"
end
resource "Pillow" do
url "https://files.pythonhosted.org/packages/51/fe/18125dc680720e4c3086dd3f5f95d80057c41ab98326877fc7d3ff6d0ee5/Pillow-6.1.0.tar.gz"
sha256 "0804f77cb1e9b6dbd37601cee11283bba39a8d44b9ddb053400c58e0c0d7d9de"
end
def install
virtualenv_install_with_resources
man1.install "manpages/monoshape.1"
end
test do
system "python", "-c", "'import monoshape.__main__'"
end
end
Homebrew error output when try to use the formula:
brew reinstall --verbose --debug ./Formula/monoshape.rb
...
==> Downloading https://files.pythonhosted.org/packages/81/1a/6b2971adc1bca55b9a53ed1efa372acff7e8b9913982a396f3fa046efaf8/Pillow-6.0.0.tar.gz
/usr/bin/curl -q --show-error --user-agent Homebrew/2.1.7\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 10.14.5\)\ curl/7.54.0 --location --silent --head --request GET https://files.pythonhosted.org/packages/81/1a/6b2971adc1bca55b9a53ed1efa372acff7e8b9913982a396f3fa046efaf8/Pillow-6.0.0.tar.gz
Already downloaded: /Users/glezseoane/Library/Caches/Homebrew/downloads/ea7321a9356188da36d495f4135bfd7dfeb7add8558b773a6421e9096db03779--Pillow-6.0.0.tar.gz
==> Verifying ea7321a9356188da36d495f4135bfd7dfeb7add8558b773a6421e9096db03779--Pillow-6.0.0.tar.gz checksum
tar xof /Users/glezseoane/Library/Caches/Homebrew/downloads/ea7321a9356188da36d495f4135bfd7dfeb7add8558b773a6421e9096db03779--Pillow-6.0.0.tar.gz -C /private/tmp/d20190708-31029-1m7e24t
cp -pR /private/tmp/d20190708-31029-1m7e24t/Pillow-6.0.0/. /private/tmp/monoshape--Pillow-20190708-31029-1w8theb/Pillow-6.0.0
chmod -Rf +w /private/tmp/d20190708-31029-1m7e24t
==> /usr/local/Cellar/monoshape/1.0/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed /private/tmp/monoshape--Pillow-20190708-31029-1w8theb/Pillow-6.0.0
Created temporary directory: /private/tmp/pip-ephem-wheel-cache-aihec4je
Created temporary directory: /private/tmp/pip-req-tracker-6pqza4qj
Created requirements tracker '/private/tmp/pip-req-tracker-6pqza4qj'
Created temporary directory: /private/tmp/pip-install-tjb4rpw6
Processing /private/tmp/monoshape--Pillow-20190708-31029-1w8theb/Pillow-6.0.0
Created temporary directory: /private/tmp/pip-req-build-rgrd0jy0
Added file:///private/tmp/monoshape--Pillow-20190708-31029-1w8theb/Pillow-6.0.0 to build tracker '/private/tmp/pip-req-tracker-6pqza4qj'
Running setup.py (path:/private/tmp/pip-req-build-rgrd0jy0/setup.py) egg_info for package from file:///private/tmp/monoshape--Pillow-20190708-31029-1w8theb/Pillow-6.0.0
Running command python setup.py egg_info
running egg_info
creating pip-egg-info/Pillow.egg-info
writing pip-egg-info/Pillow.egg-info/PKG-INFO
writing dependency_links to pip-egg-info/Pillow.egg-info/dependency_links.txt
writing top-level names to pip-egg-info/Pillow.egg-info/top_level.txt
writing manifest file 'pip-egg-info/Pillow.egg-info/SOURCES.txt'
reading manifest file 'pip-egg-info/Pillow.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.c'
warning: no files found matching '*.h'
warning: no files found matching '*.sh'
no previously-included directories found matching 'docs/_static'
warning: no previously-included files found matching '.appveyor.yml'
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching '.codecov.yml'
warning: no previously-included files found matching '.editorconfig'
warning: no previously-included files found matching '.landscape.yaml'
warning: no previously-included files found matching '.readthedocs.yml'
warning: no previously-included files found matching 'azure-pipelines.yml'
warning: no previously-included files found matching 'tox.ini'
warning: no previously-included files matching '.git*' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution
no previously-included directories found matching '.azure-pipelines'
no previously-included directories found matching '.travis'
writing manifest file 'pip-egg-info/Pillow.egg-info/SOURCES.txt'
Source in /private/tmp/pip-req-build-rgrd0jy0 has version 6.0.0, which satisfies requirement Pillow==6.0.0 from file:///private/tmp/monoshape--Pillow-20190708-31029-1w8theb/Pillow-6.0.0
Removed Pillow==6.0.0 from file:///private/tmp/monoshape--Pillow-20190708-31029-1w8theb/Pillow-6.0.0 from build tracker '/private/tmp/pip-req-tracker-6pqza4qj'
Skipping bdist_wheel for Pillow, due to binaries being disabled for it.
Installing collected packages: Pillow
Created temporary directory: /private/tmp/pip-record-1a95g79y
Running setup.py install for Pillow: started
Running command /usr/local/Cellar/monoshape/1.0/libexec/bin/python3.7 -u -c 'import setuptools, tokenize;__file__='"'"'/private/tmp/pip-req-build-rgrd0jy0/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/tmp/pip-record-1a95g79y/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/Cellar/monoshape/1.0/libexec/bin/../include/site/python3.7/Pillow
running install
running build
running build_py
creating build
creating build/lib.macosx-10.14-x86_64-3.7
creating build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/MpoImagePlugin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/ImageMode.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/PngImagePlugin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/XbmImagePlugin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/PcxImagePlugin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/SunImagePlugin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/ImageFile.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/SpiderImagePlugin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/TarIO.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/FitsStubImagePlugin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/MpegImagePlugin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/BdfFontFile.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/GribStubImagePlugin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/ImageStat.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/PixarImagePlugin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/GimpPaletteFile.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/ImageColor.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/ContainerIO.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/MspImagePlugin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/MicImagePlugin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/_version.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/ImtImagePlugin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/GifImagePlugin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/PalmImagePlugin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/ImageQt.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/ImageMath.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/PaletteFile.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/FontFile.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/PdfParser.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/ExifTags.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/ImageCms.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/FpxImagePlugin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/ImageChops.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/BufrStubImagePlugin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/PSDraw.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/PcdImagePlugin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/ImageFilter.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/ImageDraw2.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/ImagePath.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/DcxImagePlugin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/__init__.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/JpegPresets.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/Hdf5StubImagePlugin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/features.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/ImageDraw.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/GimpGradientFile.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/ImageWin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/IcoImagePlugin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/_tkinter_finder.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/EpsImagePlugin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/TgaImagePlugin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/ImageMorph.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/Jpeg2KImagePlugin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/WalImageFile.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/PcfFontFile.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/BlpImagePlugin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/ImageTk.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/GbrImagePlugin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/ImageOps.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/PdfImagePlugin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/ImageShow.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/ImageEnhance.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/WmfImagePlugin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/ImageGrab.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/WebPImagePlugin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/FliImagePlugin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/TiffTags.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/CurImagePlugin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/_util.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/GdImageFile.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/TiffImagePlugin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/IptcImagePlugin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/ImagePalette.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/BmpImagePlugin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/ImageTransform.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/IcnsImagePlugin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/McIdasImagePlugin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/XpmImagePlugin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/DdsImagePlugin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/ImageSequence.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/PyAccess.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/_binary.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/Image.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/XVThumbImagePlugin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/SgiImagePlugin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/ImImagePlugin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/PsdImagePlugin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/JpegImagePlugin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/ImageFont.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/PpmImagePlugin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
copying src/PIL/FtexImagePlugin.py -> build/lib.macosx-10.14-x86_64-3.7/PIL
running egg_info
writing src/Pillow.egg-info/PKG-INFO
writing dependency_links to src/Pillow.egg-info/dependency_links.txt
writing top-level names to src/Pillow.egg-info/top_level.txt
reading manifest file 'src/Pillow.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.c'
warning: no files found matching '*.h'
warning: no files found matching '*.sh'
no previously-included directories found matching 'docs/_static'
warning: no previously-included files found matching '.appveyor.yml'
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching '.codecov.yml'
warning: no previously-included files found matching '.editorconfig'
warning: no previously-included files found matching '.landscape.yaml'
warning: no previously-included files found matching '.readthedocs.yml'
warning: no previously-included files found matching 'azure-pipelines.yml'
warning: no previously-included files found matching 'tox.ini'
warning: no previously-included files matching '.git*' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution
no previously-included directories found matching '.azure-pipelines'
no previously-included directories found matching '.travis'
writing manifest file 'src/Pillow.egg-info/SOURCES.txt'
running build_ext
building 'PIL._imaging' extension
creating build/temp.macosx-10.14-x86_64-3.7
building 'PIL._imagingcms' extension
building 'PIL._imagingft' extension
building 'PIL._webp' extension
creating build/temp.macosx-10.14-x86_64-3.7/src
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DHAVE_WEBPMUX -I/usr/local/Cellar/freetype/2.10.0/include/freetype2 -I/usr/local/Cellar/openjpeg/2.3.1/include/openjpeg-2.3 -I/private/tmp/pip-req-build-rgrd0jy0/src/libImaging -I/usr/local/Cellar/monoshape/1.0/libexec/include -I/usr/local/include -I/usr/include -I/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c src/_webp.c -o build/temp.macosx-10.14-x86_64-3.7/src/_webp.o
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/Cellar/freetype/2.10.0/include/freetype2 -I/usr/local/Cellar/openjpeg/2.3.1/include/openjpeg-2.3 -I/private/tmp/pip-req-build-rgrd0jy0/src/libImaging -I/usr/local/Cellar/monoshape/1.0/libexec/include -I/usr/local/include -I/usr/include -I/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c src/_imagingft.c -o build/temp.macosx-10.14-x86_64-3.7/src/_imagingft.o
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/Cellar/freetype/2.10.0/include/freetype2 -I/usr/local/Cellar/openjpeg/2.3.1/include/openjpeg-2.3 -I/private/tmp/pip-req-build-rgrd0jy0/src/libImaging -I/usr/local/Cellar/monoshape/1.0/libexec/include -I/usr/local/include -I/usr/include -I/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c src/_imagingcms.c -o build/temp.macosx-10.14-x86_64-3.7/src/_imagingcms.o
creating build/temp.macosx-10.14-x86_64-3.7/src/libImaging
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DHAVE_LIBJPEG -DHAVE_OPENJPEG -DHAVE_LIBZ -DHAVE_LIBTIFF -DPILLOW_VERSION="6.0.0" -I/usr/local/Cellar/freetype/2.10.0/include/freetype2 -I/usr/local/Cellar/openjpeg/2.3.1/include/openjpeg-2.3 -I/private/tmp/pip-req-build-rgrd0jy0/src/libImaging -I/usr/local/Cellar/monoshape/1.0/libexec/include -I/usr/local/include -I/usr/include -I/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c src/_imaging.c -o build/temp.macosx-10.14-x86_64-3.7/src/_imaging.o
src/_imagingft.c:25:10: fatal error: 'ft2build.h' file not found
#include <ft2build.h>
^~~~~~~~~~~~
1 error generated.
building 'PIL._imagingtk' extension
creating build/temp.macosx-10.14-x86_64-3.7/src/Tk
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -Isrc/Tk -I/usr/local/Cellar/freetype/2.10.0/include/freetype2 -I/usr/local/Cellar/openjpeg/2.3.1/include/openjpeg-2.3 -I/private/tmp/pip-req-build-rgrd0jy0/src/libImaging -I/usr/local/Cellar/monoshape/1.0/libexec/include -I/usr/local/include -I/usr/include -I/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c src/_imagingtk.c -o build/temp.macosx-10.14-x86_64-3.7/src/_imagingtk.o
clang -bundle -undefined dynamic_lookup -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk build/temp.macosx-10.14-x86_64-3.7/src/_webp.o -L/usr/local/Cellar/monoshape/1.0/libexec/lib -L/usr/local/lib -L/usr/lib -lwebp -lwebpmux -lwebpdemux -o build/lib.macosx-10.14-x86_64-3.7/PIL/_webp.cpython-37m-darwin.so
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -Isrc/Tk -I/usr/local/Cellar/freetype/2.10.0/include/freetype2 -I/usr/local/Cellar/openjpeg/2.3.1/include/openjpeg-2.3 -I/private/tmp/pip-req-build-rgrd0jy0/src/libImaging -I/usr/local/Cellar/monoshape/1.0/libexec/include -I/usr/local/include -I/usr/include -I/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c src/Tk/tkImaging.c -o build/temp.macosx-10.14-x86_64-3.7/src/Tk/tkImaging.o
building 'PIL._imagingmath' extension
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/Cellar/freetype/2.10.0/include/freetype2 -I/usr/local/Cellar/openjpeg/2.3.1/include/openjpeg-2.3 -I/private/tmp/pip-req-build-rgrd0jy0/src/libImaging -I/usr/local/Cellar/monoshape/1.0/libexec/include -I/usr/local/include -I/usr/include -I/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c src/_imagingmath.c -o build/temp.macosx-10.14-x86_64-3.7/src/_imagingmath.o
clang -bundle -undefined dynamic_lookup -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk build/temp.macosx-10.14-x86_64-3.7/src/_imagingcms.o -L/usr/local/Cellar/monoshape/1.0/libexec/lib -L/usr/local/lib -L/usr/lib -llcms2 -o build/lib.macosx-10.14-x86_64-3.7/PIL/_imagingcms.cpython-37m-darwin.so
building 'PIL._imagingmorph' extension
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/Cellar/freetype/2.10.0/include/freetype2 -I/usr/local/Cellar/openjpeg/2.3.1/include/openjpeg-2.3 -I/private/tmp/pip-req-build-rgrd0jy0/src/libImaging -I/usr/local/Cellar/monoshape/1.0/libexec/include -I/usr/local/include -I/usr/include -I/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c src/_imagingmorph.c -o build/temp.macosx-10.14-x86_64-3.7/src/_imagingmorph.o
clang -bundle -undefined dynamic_lookup -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk build/temp.macosx-10.14-x86_64-3.7/src/_imagingtk.o build/temp.macosx-10.14-x86_64-3.7/src/Tk/tkImaging.o -L/usr/local/Cellar/monoshape/1.0/libexec/lib -L/usr/local/lib -L/usr/lib -o build/lib.macosx-10.14-x86_64-3.7/PIL/_imagingtk.cpython-37m-darwin.so
clang -bundle -undefined dynamic_lookup -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk build/temp.macosx-10.14-x86_64-3.7/src/_imagingmorph.o -L/usr/local/Cellar/monoshape/1.0/libexec/lib -L/usr/local/lib -L/usr/lib -o build/lib.macosx-10.14-x86_64-3.7/PIL/_imagingmorph.cpython-37m-darwin.so
clang -bundle -undefined dynamic_lookup -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk build/temp.macosx-10.14-x86_64-3.7/src/_imagingmath.o -L/usr/local/Cellar/monoshape/1.0/libexec/lib -L/usr/local/lib -L/usr/lib -o build/lib.macosx-10.14-x86_64-3.7/PIL/_imagingmath.cpython-37m-darwin.so
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DHAVE_LIBJPEG -DHAVE_OPENJPEG -DHAVE_LIBZ -DHAVE_LIBTIFF -DPILLOW_VERSION="6.0.0" -I/usr/local/Cellar/freetype/2.10.0/include/freetype2 -I/usr/local/Cellar/openjpeg/2.3.1/include/openjpeg-2.3 -I/private/tmp/pip-req-build-rgrd0jy0/src/libImaging -I/usr/local/Cellar/monoshape/1.0/libexec/include -I/usr/local/include -I/usr/include -I/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c src/decode.c -o build/temp.macosx-10.14-x86_64-3.7/src/decode.o
In file included from src/decode.c:869:
/private/tmp/pip-req-build-rgrd0jy0/src/libImaging/Jpeg2K.h:11:10: fatal error: 'openjpeg.h' file not found
#include <openjpeg.h>
^~~~~~~~~~~~
1 error generated.
error: command 'clang' failed with exit status 1
Running setup.py install for Pillow: finished with status 'error'
Cleaning up...
Removing source in /private/tmp/pip-req-build-rgrd0jy0
Removed build tracker '/private/tmp/pip-req-tracker-6pqza4qj'
ERROR: Command "/usr/local/Cellar/monoshape/1.0/libexec/bin/python3.7 -u -c 'import setuptools, tokenize;__file__='"'"'/private/tmp/pip-req-build-rgrd0jy0/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/tmp/pip-record-1a95g79y/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/Cellar/monoshape/1.0/libexec/bin/../include/site/python3.7/Pillow" failed with error code 1 in /private/tmp/pip-req-build-rgrd0jy0/
Exception information:
Traceback (most recent call last):
File "/usr/local/Cellar/monoshape/1.0/libexec/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 178, in main
status = self.run(options, args)
File "/usr/local/Cellar/monoshape/1.0/libexec/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 414, in run
use_user_site=options.use_user_site,
File "/usr/local/Cellar/monoshape/1.0/libexec/lib/python3.7/site-packages/pip/_internal/req/__init__.py", line 58, in install_given_reqs
**kwargs
File "/usr/local/Cellar/monoshape/1.0/libexec/lib/python3.7/site-packages/pip/_internal/req/req_install.py", line 951, in install
spinner=spinner,
File "/usr/local/Cellar/monoshape/1.0/libexec/lib/python3.7/site-packages/pip/_internal/utils/misc.py", line 776, in call_subprocess
% (command_desc, proc.returncode, cwd))
pip._internal.exceptions.InstallationError: Command "/usr/local/Cellar/monoshape/1.0/libexec/bin/python3.7 -u -c 'import setuptools, tokenize;__file__='"'"'/private/tmp/pip-req-build-rgrd0jy0/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/tmp/pip-record-1a95g79y/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/Cellar/monoshape/1.0/libexec/bin/../include/site/python3.7/Pillow" failed with error code 1 in /private/tmp/pip-req-build-rgrd0jy0/
/usr/bin/curl --version
/usr/libexec/java_home --xml --failfast
/usr/libexec/java_home --xml --failfast
/usr/local/Homebrew/Library/Homebrew/debrew.rb:13:in `raise'
BuildError: Failed executing: /usr/local/Cellar/monoshape/1.0/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed /private/tmp/monoshape--Pillow-20190708-31029-1w8theb/Pillow-6.0.0
Since macOS Mojave 10.14.5 with Python 3.7 and Homebrew updated.
You likely need to include additional depends_on clauses to help Pillow locate compiled libraries: e.g., depends_on "openjpeg" (which provides openjpeg.h).

Fail to install lxml on ubuntu

I am attempting to install lxml inside a virtualenv on ubuntu 14.04.
$ uname -a
Linux foobar 3.13.0-48-generic #80-Ubuntu SMP Thu Mar 12 11:16:15 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.1 LTS
Release: 14.04
Codename: trusty
I have the dependencies installed, as specified in the lxml documentation. Here are the specific packages I have installed:
$ dpkg-query -l | grep libxml
ii libxml-commons-external-java 1.4.01-2build1 all XML Commons external code - DOM, SAX, and JAXP, etc
ii libxml-commons-resolver1.1-java 1.2-7build1 all XML entity and URI resolver library
ii libxml-parser-perl 2.41-1build3 amd64 Perl module for parsing XML files
ii libxml2:amd64 2.9.1+dfsg1-3ubuntu4.4 amd64 GNOME XML library
ii libxml2-dev:amd64 2.9.1+dfsg1-3ubuntu4.4 amd64 Development files for the GNOME XML library
ii python-lxml 3.3.3-1ubuntu0.1 amd64 pythonic binding for the libxml2 and libxslt libraries
$ dpkg-query -l | grep libxslt
ii libxslt1-dev:amd64 1.1.28-2build1 amd64 XSLT 1.0 processing library - development kit
ii libxslt1.1:amd64 1.1.28-2build1 amd64 XSLT 1.0 processing library - runtime library
ii python-lxml 3.3.3-1ubuntu0.1 amd64 pythonic binding for the libxml2 and libxslt libraries
$ dpkg-query -l | grep python-dev
ii libpython-dev:amd64 2.7.5-5ubuntu3 amd64 header files and a static library for Python (default)
ii python-dev 2.7.5-5ubuntu3 amd64 header files and a static library for Python (default)
When I attempt to install inside a virtualenv:
$ virtualenv venv
New python executable in venv/bin/python
Installing setuptools, pip, wheel...done.
~$ source venv/bin/activate
(venv)~$ export PATH=$PATH:/usr/lib/gcc/x86_64-linux-gnu/4.8/ # If I don't do this cc1 is not found and the build fails
(venv)~$ pip install lxml
Collecting lxml
Using cached lxml-3.4.4.tar.gz
Building wheels for collected packages: lxml
Running setup.py bdist_wheel for lxml
Complete output from command /home/plasma/venv/bin/python -c "import setuptools;__file__='/tmp/pip-build-Fs3av2/lxml/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmpoWlzvPpip-wheel-:
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
Building lxml version 3.4.4.
Building without Cython.
Using build configuration of libxslt 1.1.28
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/lxml
copying src/lxml/__init__.py -> build/lib.linux-x86_64-2.7/lxml
copying src/lxml/doctestcompare.py -> build/lib.linux-x86_64-2.7/lxml
copying src/lxml/builder.py -> build/lib.linux-x86_64-2.7/lxml
copying src/lxml/ElementInclude.py -> build/lib.linux-x86_64-2.7/lxml
copying src/lxml/pyclasslookup.py -> build/lib.linux-x86_64-2.7/lxml
copying src/lxml/_elementpath.py -> build/lib.linux-x86_64-2.7/lxml
copying src/lxml/cssselect.py -> build/lib.linux-x86_64-2.7/lxml
copying src/lxml/sax.py -> build/lib.linux-x86_64-2.7/lxml
copying src/lxml/usedoctest.py -> build/lib.linux-x86_64-2.7/lxml
creating build/lib.linux-x86_64-2.7/lxml/includes
copying src/lxml/includes/__init__.py -> build/lib.linux-x86_64-2.7/lxml/includes
creating build/lib.linux-x86_64-2.7/lxml/html
copying src/lxml/html/_diffcommand.py -> build/lib.linux-x86_64-2.7/lxml/html
copying src/lxml/html/ElementSoup.py -> build/lib.linux-x86_64-2.7/lxml/html
copying src/lxml/html/__init__.py -> build/lib.linux-x86_64-2.7/lxml/html
copying src/lxml/html/builder.py -> build/lib.linux-x86_64-2.7/lxml/html
copying src/lxml/html/html5parser.py -> build/lib.linux-x86_64-2.7/lxml/html
copying src/lxml/html/soupparser.py -> build/lib.linux-x86_64-2.7/lxml/html
copying src/lxml/html/_html5builder.py -> build/lib.linux-x86_64-2.7/lxml/html
copying src/lxml/html/formfill.py -> build/lib.linux-x86_64-2.7/lxml/html
copying src/lxml/html/diff.py -> build/lib.linux-x86_64-2.7/lxml/html
copying src/lxml/html/clean.py -> build/lib.linux-x86_64-2.7/lxml/html
copying src/lxml/html/_setmixin.py -> build/lib.linux-x86_64-2.7/lxml/html
copying src/lxml/html/usedoctest.py -> build/lib.linux-x86_64-2.7/lxml/html
copying src/lxml/html/defs.py -> build/lib.linux-x86_64-2.7/lxml/html
creating build/lib.linux-x86_64-2.7/lxml/isoschematron
copying src/lxml/isoschematron/__init__.py -> build/lib.linux-x86_64-2.7/lxml/isoschematron
copying src/lxml/lxml.etree.h -> build/lib.linux-x86_64-2.7/lxml
copying src/lxml/lxml.etree_api.h -> build/lib.linux-x86_64-2.7/lxml
copying src/lxml/includes/schematron.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
copying src/lxml/includes/xmlparser.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
copying src/lxml/includes/tree.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
copying src/lxml/includes/etreepublic.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
copying src/lxml/includes/xslt.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
copying src/lxml/includes/xmlerror.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
copying src/lxml/includes/uri.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
copying src/lxml/includes/relaxng.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
copying src/lxml/includes/c14n.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
copying src/lxml/includes/dtdvalid.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
copying src/lxml/includes/htmlparser.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
copying src/lxml/includes/config.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
copying src/lxml/includes/xpath.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
copying src/lxml/includes/xmlschema.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
copying src/lxml/includes/xinclude.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
copying src/lxml/includes/lxml-version.h -> build/lib.linux-x86_64-2.7/lxml/includes
copying src/lxml/includes/etree_defs.h -> build/lib.linux-x86_64-2.7/lxml/includes
creating build/lib.linux-x86_64-2.7/lxml/isoschematron/resources
creating build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/rng
copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/rng
creating build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl
creating build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
running build_ext
building 'lxml.etree' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
creating build/temp.linux-x86_64-2.7/src/lxml
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/libxml2 -I/tmp/pip-build-Fs3av2/lxml/src/lxml/includes -I/usr/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -w
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -lxslt -lexslt -lxml2 -lz -lm -o build/lib.linux-x86_64-2.7/lxml/etree.so
x86_64-linux-gnu-gcc: fatal error: -fuse-linker-plugin, but liblto_plugin.so not found
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 4
----------------------------------------
Failed building wheel for lxml
Failed to build lxml
Installing collected packages: lxml
Running setup.py install for lxml
Complete output from command /home/plasma/venv/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-Fs3av2/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-23Wgk1-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/plasma/venv/include/site/python2.7/lxml:
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
Building lxml version 3.4.4.
Building without Cython.
Using build configuration of libxslt 1.1.28
running install
running build
running build_py
copying src/lxml/includes/lxml-version.h -> build/lib.linux-x86_64-2.7/lxml/includes
running build_ext
building 'lxml.etree' extension
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/libxml2 -I/tmp/pip-build-Fs3av2/lxml/src/lxml/includes -I/usr/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -w
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -lxslt -lexslt -lxml2 -lz -lm -o build/lib.linux-x86_64-2.7/lxml/etree.so
x86_64-linux-gnu-gcc: fatal error: -fuse-linker-plugin, but liblto_plugin.so not found
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 4
----------------------------------------
Command "/home/plasma/venv/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-Fs3av2/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-23Wgk1-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/plasma/venv/include/site/python2.7/lxml" failed with error code 1 in /tmp/pip-build-Fs3av2/lxml
(venv)~$
However, I do have liblto_plugin.so:
$ find -name liblto_plugin* 2> /dev/null
./usr/lib/gcc/x86_64-linux-gnu/4.8/liblto_plugin.so
./usr/lib/gcc/x86_64-linux-gnu/4.8/liblto_plugin.so.0
./usr/lib/gcc/x86_64-linux-gnu/4.8/liblto_plugin.so.0.0.0
I know I can install lxml using apt-get, but I am trying to have a virtual environment in which I can install these packages so I can have a consistent environment for unit tests.
Any suggestions on how to get this to work would be appreciated.
I have a solution for when all else fails. Go to this website. http://www.lfd.uci.edu/~gohlke/pythonlibs/
This has ALMOST ALL Python libraries, with whl files for every type of installation, 32 bit and 64 bit, and all the Python versions since 2.6 (including beta 3.5)!

Django MySQLClient pip compile failure on Linux

Django documentation as of v1.8 recommends using mysqlclient connector for the framework. I'm attempting to pip install the package on Ubuntu 14.04 with Python 3.4 and running into a GCC error that I'm unable to find reference to. I'm not an expert on compiling software, so was hoping somebody can see the solution.
I believe I'm getting a linking error. I have installed distro specific mysql headers, but it looked like they were only applicable to Python 2.7.x.
Not sure how much of this is useful so apologies for the long paste, but here's the error log:
Using version 1.3.6 (newest of versions: 1.3.6, 1.3.5, 1.3.4, 1.3.3, 1.3.2, 1.3.1, 1.3.0)
Downloading from URL https://pypi.python.org/packages/source/m/mysqlclient/mysqlclient-1.3.6.tar.gz#md5=58d7c9c617a4286a88db290e7857d3aa (from https://pypi.python.org/simple/mysqlclient/)
Running setup.py (path:/tmp/pycharm-packaging4.tmp/mysqlclient/setup.py) egg_info for package mysqlclient
running egg_info
creating pip-egg-info/mysqlclient.egg-info
writing dependency_links to pip-egg-info/mysqlclient.egg-info/dependency_links.txt
writing top-level names to pip-egg-info/mysqlclient.egg-info/top_level.txt
writing pip-egg-info/mysqlclient.egg-info/PKG-INFO
writing manifest file 'pip-egg-info/mysqlclient.egg-info/SOURCES.txt'
warning: manifest_maker: standard file '-c' not found
reading manifest file 'pip-egg-info/mysqlclient.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'pip-egg-info/mysqlclient.egg-info/SOURCES.txt'
Source in /tmp/pycharm-packaging4.tmp/mysqlclient has version 1.3.6, which satisfies requirement mysqlclient
Installing collected packages: mysqlclient
Running setup.py install for mysqlclient
Running command /home/tim/BingVEnv/bin/python -c "import setuptools, tokenize;__file__='/tmp/pycharm-packaging4.tmp/mysqlclient/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-4bp9npvl-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/tim/BingVEnv/include/site/python3.4
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.4
copying _mysql_exceptions.py -> build/lib.linux-x86_64-3.4
creating build/lib.linux-x86_64-3.4/MySQLdb
copying MySQLdb/__init__.py -> build/lib.linux-x86_64-3.4/MySQLdb
copying MySQLdb/compat.py -> build/lib.linux-x86_64-3.4/MySQLdb
copying MySQLdb/converters.py -> build/lib.linux-x86_64-3.4/MySQLdb
copying MySQLdb/connections.py -> build/lib.linux-x86_64-3.4/MySQLdb
copying MySQLdb/cursors.py -> build/lib.linux-x86_64-3.4/MySQLdb
copying MySQLdb/release.py -> build/lib.linux-x86_64-3.4/MySQLdb
copying MySQLdb/times.py -> build/lib.linux-x86_64-3.4/MySQLdb
creating build/lib.linux-x86_64-3.4/MySQLdb/constants
copying MySQLdb/constants/__init__.py -> build/lib.linux-x86_64-3.4/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.linux-x86_64-3.4/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-3.4/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.linux-x86_64-3.4/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.linux-x86_64-3.4/MySQLdb/constants
copying MySQLdb/constants/REFRESH.py -> build/lib.linux-x86_64-3.4/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.linux-x86_64-3.4/MySQLdb/constants
running build_ext
building '_mysql' extension
creating build/temp.linux-x86_64-3.4
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -Dversion_info=(1,3,6,'final',1) -D__version__=1.3.6 -I/usr/include/mysql -I/home/tim/BingVEnv/include -I/usr/include/python3.4m -c _mysql.c -o build/temp.linux-x86_64-3.4/_mysql.o -fPIC -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.4/_mysql.o -lmysqlclient -lpthread -lz -lm -ldl -o build/lib.linux-x86_64-3.4/_mysql.cpython-34m.so
/usr/bin/ld: cannot find -lz
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Complete output from command /home/tim/BingVEnv/bin/python -c "import setuptools, tokenize;__file__='/tmp/pycharm-packaging4.tmp/mysqlclient/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-4bp9npvl-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/tim/BingVEnv/include/site/python3.4:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.4
copying _mysql_exceptions.py -> build/lib.linux-x86_64-3.4
creating build/lib.linux-x86_64-3.4/MySQLdb
copying MySQLdb/__init__.py -> build/lib.linux-x86_64-3.4/MySQLdb
copying MySQLdb/compat.py -> build/lib.linux-x86_64-3.4/MySQLdb
copying MySQLdb/converters.py -> build/lib.linux-x86_64-3.4/MySQLdb
copying MySQLdb/connections.py -> build/lib.linux-x86_64-3.4/MySQLdb
copying MySQLdb/cursors.py -> build/lib.linux-x86_64-3.4/MySQLdb
copying MySQLdb/release.py -> build/lib.linux-x86_64-3.4/MySQLdb
copying MySQLdb/times.py -> build/lib.linux-x86_64-3.4/MySQLdb
creating build/lib.linux-x86_64-3.4/MySQLdb/constants
copying MySQLdb/constants/__init__.py -> build/lib.linux-x86_64-3.4/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.linux-x86_64-3.4/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-3.4/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.linux-x86_64-3.4/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.linux-x86_64-3.4/MySQLdb/constants
copying MySQLdb/constants/REFRESH.py -> build/lib.linux-x86_64-3.4/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.linux-x86_64-3.4/MySQLdb/constants
running build_ext
building '_mysql' extension
creating build/temp.linux-x86_64-3.4
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -Dversion_info=(1,3,6,'final',1) -D__version__=1.3.6 -I/usr/include/mysql -I/home/tim/BingVEnv/include -I/usr/include/python3.4m -c _mysql.c -o build/temp.linux-x86_64-3.4/_mysql.o -fPIC -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.4/_mysql.o -lmysqlclient -lpthread -lz -lm -ldl -o build/lib.linux-x86_64-3.4/_mysql.cpython-34m.so
/usr/bin/ld: cannot find -lz
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
It looks like you're missing zlib; you'll want to install it: apt-get install zlib1g-dev
I also suggest reading over the README and confirming you have all other dependencies met: https://github.com/dccmx/mysqldb/blob/master/README
Also, I suggest using mysqlclient over MySQLdb as its a fork of MySQLdb and what Django recommends.
using this MySQL Connector worked for me:
https://dev.mysql.com/downloads/connector/python/
https://dev.mysql.com/doc/connector-python/en/connector-python-installation.html
http://dev.mysql.com/doc/connector-python/en/connector-python-django-backend.html

ImportError: No module named lxml.html when creating scrapy project

I'm on OS 10.9.5 and get the following error when I try to create a scrapy project:
Traceback (most recent call last):
File "/usr/local/bin/scrapy", line 7, in <module>
from scrapy.cmdline import execute
File "/Library/Python/2.7/site-packages/scrapy/__init__.py", line 56, in <module>
from scrapy.spider import Spider
File "/Library/Python/2.7/site-packages/scrapy/spider.py", line 7, in <module>
from scrapy.http import Request
File "/Library/Python/2.7/site-packages/scrapy/http/__init__.py", line 11, in <module>
from scrapy.http.request.form import FormRequest
File "/Library/Python/2.7/site-packages/scrapy/http/request/form.py", line 9, in <module>
import lxml.html
ImportError: No module named lxml.html
I first tried to uninstall and then reinstall scrapy using pip. I'm not sure whether the problem is actually that something went wrong during the installation of scrapy. I get the following output when installing scrapy:
Downloading/unpacking scrapy
Downloading Scrapy-0.24.4-py2-none-any.whl (444kB): 444kB downloaded
Requirement already satisfied (use --upgrade to upgrade): pyOpenSSL in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from scrapy)
Requirement already satisfied (use --upgrade to upgrade): six>=1.5.2 in /Library/Python/2.7/site-packages (from scrapy)
Requirement already satisfied (use --upgrade to upgrade): queuelib in /Library/Python/2.7/site-packages (from scrapy)
Downloading/unpacking lxml (from scrapy)
Downloading lxml-3.4.0.tar.gz (3.5MB): 3.5MB downloaded
Running setup.py (path:/private/tmp/pip_build_root/lxml/setup.py) egg_info for package lxml
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
Building lxml version 3.4.0.
Building without Cython.
Using build configuration of libxslt 1.1.28
warning: no previously-included files found matching '*.py'
Requirement already satisfied (use --upgrade to upgrade): w3lib>=1.8.0 in /Library/Python/2.7/site-packages (from scrapy)
Downloading/unpacking cssselect>=0.9 (from scrapy)
Downloading cssselect-0.9.1.tar.gz
Running setup.py (path:/private/tmp/pip_build_root/cssselect/setup.py) egg_info for package cssselect
no previously-included directories found matching 'docs/_build'
Requirement already satisfied (use --upgrade to upgrade): Twisted>=10.0.0 in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from scrapy)
Requirement already satisfied (use --upgrade to upgrade): zope.interface in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from Twisted>=10.0.0->scrapy)
Requirement already satisfied (use --upgrade to upgrade): setuptools in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from zope.interface->Twisted>=10.0.0->scrapy)
Installing collected packages: scrapy, lxml, cssselect
Running setup.py install for lxml
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
Building lxml version 3.4.0.
Building without Cython.
Using build configuration of libxslt 1.1.28
building 'lxml.etree' 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/usr/include/libxml2 -I/private/tmp/pip_build_root/lxml/src/lxml/includes -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.macosx-10.9-intel-2.7/src/lxml/lxml.etree.o -w -flat_namespace
You have not agreed to the Xcode license agreements, please run 'xcodebuild -license' (for user-level acceptance) or 'sudo xcodebuild -license' (for system-wide acceptance) from within a Terminal window to review and agree to the Xcode license agreements.
error: command 'cc' failed with exit status 69
Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/tmp/pip_build_root/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-3TNhV_-record/install-record.txt --single-version-externally-managed --compile:
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
Building lxml version 3.4.0.
Building without Cython.
Using build configuration of libxslt 1.1.28
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-intel-2.7
creating build/lib.macosx-10.9-intel-2.7/lxml
copying src/lxml/__init__.py -> build/lib.macosx-10.9-intel-2.7/lxml
copying src/lxml/_elementpath.py -> build/lib.macosx-10.9-intel-2.7/lxml
copying src/lxml/builder.py -> build/lib.macosx-10.9-intel-2.7/lxml
copying src/lxml/cssselect.py -> build/lib.macosx-10.9-intel-2.7/lxml
copying src/lxml/doctestcompare.py -> build/lib.macosx-10.9-intel-2.7/lxml
copying src/lxml/ElementInclude.py -> build/lib.macosx-10.9-intel-2.7/lxml
copying src/lxml/pyclasslookup.py -> build/lib.macosx-10.9-intel-2.7/lxml
copying src/lxml/sax.py -> build/lib.macosx-10.9-intel-2.7/lxml
copying src/lxml/usedoctest.py -> build/lib.macosx-10.9-intel-2.7/lxml
creating build/lib.macosx-10.9-intel-2.7/lxml/includes
copying src/lxml/includes/__init__.py -> build/lib.macosx-10.9-intel-2.7/lxml/includes
creating build/lib.macosx-10.9-intel-2.7/lxml/html
copying src/lxml/html/__init__.py -> build/lib.macosx-10.9-intel-2.7/lxml/html
copying src/lxml/html/_diffcommand.py -> build/lib.macosx-10.9-intel-2.7/lxml/html
copying src/lxml/html/_html5builder.py -> build/lib.macosx-10.9-intel-2.7/lxml/html
copying src/lxml/html/_setmixin.py -> build/lib.macosx-10.9-intel-2.7/lxml/html
copying src/lxml/html/builder.py -> build/lib.macosx-10.9-intel-2.7/lxml/html
copying src/lxml/html/clean.py -> build/lib.macosx-10.9-intel-2.7/lxml/html
copying src/lxml/html/defs.py -> build/lib.macosx-10.9-intel-2.7/lxml/html
copying src/lxml/html/diff.py -> build/lib.macosx-10.9-intel-2.7/lxml/html
copying src/lxml/html/ElementSoup.py -> build/lib.macosx-10.9-intel-2.7/lxml/html
copying src/lxml/html/formfill.py -> build/lib.macosx-10.9-intel-2.7/lxml/html
copying src/lxml/html/html5parser.py -> build/lib.macosx-10.9-intel-2.7/lxml/html
copying src/lxml/html/soupparser.py -> build/lib.macosx-10.9-intel-2.7/lxml/html
copying src/lxml/html/usedoctest.py -> build/lib.macosx-10.9-intel-2.7/lxml/html
creating build/lib.macosx-10.9-intel-2.7/lxml/isoschematron
copying src/lxml/isoschematron/__init__.py -> build/lib.macosx-10.9-intel-2.7/lxml/isoschematron
copying src/lxml/lxml.etree.h -> build/lib.macosx-10.9-intel-2.7/lxml
copying src/lxml/lxml.etree_api.h -> build/lib.macosx-10.9-intel-2.7/lxml
copying src/lxml/includes/c14n.pxd -> build/lib.macosx-10.9-intel-2.7/lxml/includes
copying src/lxml/includes/config.pxd -> build/lib.macosx-10.9-intel-2.7/lxml/includes
copying src/lxml/includes/dtdvalid.pxd -> build/lib.macosx-10.9-intel-2.7/lxml/includes
copying src/lxml/includes/etreepublic.pxd -> build/lib.macosx-10.9-intel-2.7/lxml/includes
copying src/lxml/includes/htmlparser.pxd -> build/lib.macosx-10.9-intel-2.7/lxml/includes
copying src/lxml/includes/relaxng.pxd -> build/lib.macosx-10.9-intel-2.7/lxml/includes
copying src/lxml/includes/schematron.pxd -> build/lib.macosx-10.9-intel-2.7/lxml/includes
copying src/lxml/includes/tree.pxd -> build/lib.macosx-10.9-intel-2.7/lxml/includes
copying src/lxml/includes/uri.pxd -> build/lib.macosx-10.9-intel-2.7/lxml/includes
copying src/lxml/includes/xinclude.pxd -> build/lib.macosx-10.9-intel-2.7/lxml/includes
copying src/lxml/includes/xmlerror.pxd -> build/lib.macosx-10.9-intel-2.7/lxml/includes
copying src/lxml/includes/xmlparser.pxd -> build/lib.macosx-10.9-intel-2.7/lxml/includes
copying src/lxml/includes/xmlschema.pxd -> build/lib.macosx-10.9-intel-2.7/lxml/includes
copying src/lxml/includes/xpath.pxd -> build/lib.macosx-10.9-intel-2.7/lxml/includes
copying src/lxml/includes/xslt.pxd -> build/lib.macosx-10.9-intel-2.7/lxml/includes
copying src/lxml/includes/etree_defs.h -> build/lib.macosx-10.9-intel-2.7/lxml/includes
copying src/lxml/includes/lxml-version.h -> build/lib.macosx-10.9-intel-2.7/lxml/includes
creating build/lib.macosx-10.9-intel-2.7/lxml/isoschematron/resources
creating build/lib.macosx-10.9-intel-2.7/lxml/isoschematron/resources/rng
copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.macosx-10.9-intel-2.7/lxml/isoschematron/resources/rng
creating build/lib.macosx-10.9-intel-2.7/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -> build/lib.macosx-10.9-intel-2.7/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -> build/lib.macosx-10.9-intel-2.7/lxml/isoschematron/resources/xsl
creating build/lib.macosx-10.9-intel-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl -> build/lib.macosx-10.9-intel-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl -> build/lib.macosx-10.9-intel-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl -> build/lib.macosx-10.9-intel-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl -> build/lib.macosx-10.9-intel-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl -> build/lib.macosx-10.9-intel-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.macosx-10.9-intel-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
running build_ext
building 'lxml.etree' extension
creating build/temp.macosx-10.9-intel-2.7
creating build/temp.macosx-10.9-intel-2.7/src
creating build/temp.macosx-10.9-intel-2.7/src/lxml
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/usr/include/libxml2 -I/private/tmp/pip_build_root/lxml/src/lxml/includes -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.macosx-10.9-intel-2.7/src/lxml/lxml.etree.o -w -flat_namespace
You have not agreed to the Xcode license agreements, please run 'xcodebuild -license' (for user-level acceptance) or 'sudo xcodebuild -license' (for system-wide acceptance) from within a Terminal window to review and agree to the Xcode license agreements.
error: command 'cc' failed with exit status 69
----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/tmp/pip_build_root/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-3TNhV_-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/tmp/pip_build_root/lxml
I also tried to install lxml seperately and get the following output:
Downloading/unpacking lxml
Downloading lxml-3.4.0.tar.gz (3.5MB): 3.5MB downloaded
Running setup.py (path:/private/tmp/pip_build_root/lxml/setup.py) egg_info for package lxml
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
Building lxml version 3.4.0.
Building without Cython.
Using build configuration of libxslt 1.1.28
warning: no previously-included files found matching '*.py'
Installing collected packages: lxml
Running setup.py install for lxml
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
Building lxml version 3.4.0.
Building without Cython.
Using build configuration of libxslt 1.1.28
building 'lxml.etree' 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/usr/include/libxml2 -I/private/tmp/pip_build_root/lxml/src/lxml/includes -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.macosx-10.9-intel-2.7/src/lxml/lxml.etree.o -w -flat_namespace
You have not agreed to the Xcode license agreements, please run 'xcodebuild -license' (for user-level acceptance) or 'sudo xcodebuild -license' (for system-wide acceptance) from within a Terminal window to review and agree to the Xcode license agreements.
error: command 'cc' failed with exit status 69
Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/tmp/pip_build_root/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-l6wwGK-record/install-record.txt --single-version-externally-managed --compile:
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
Building lxml version 3.4.0.
Building without Cython.
Using build configuration of libxslt 1.1.28
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-intel-2.7
creating build/lib.macosx-10.9-intel-2.7/lxml
copying src/lxml/__init__.py -> build/lib.macosx-10.9-intel-2.7/lxml
copying src/lxml/_elementpath.py -> build/lib.macosx-10.9-intel-2.7/lxml
copying src/lxml/builder.py -> build/lib.macosx-10.9-intel-2.7/lxml
copying src/lxml/cssselect.py -> build/lib.macosx-10.9-intel-2.7/lxml
copying src/lxml/doctestcompare.py -> build/lib.macosx-10.9-intel-2.7/lxml
copying src/lxml/ElementInclude.py -> build/lib.macosx-10.9-intel-2.7/lxml
copying src/lxml/pyclasslookup.py -> build/lib.macosx-10.9-intel-2.7/lxml
copying src/lxml/sax.py -> build/lib.macosx-10.9-intel-2.7/lxml
copying src/lxml/usedoctest.py -> build/lib.macosx-10.9-intel-2.7/lxml
creating build/lib.macosx-10.9-intel-2.7/lxml/includes
copying src/lxml/includes/__init__.py -> build/lib.macosx-10.9-intel-2.7/lxml/includes
creating build/lib.macosx-10.9-intel-2.7/lxml/html
copying src/lxml/html/__init__.py -> build/lib.macosx-10.9-intel-2.7/lxml/html
copying src/lxml/html/_diffcommand.py -> build/lib.macosx-10.9-intel-2.7/lxml/html
copying src/lxml/html/_html5builder.py -> build/lib.macosx-10.9-intel-2.7/lxml/html
copying src/lxml/html/_setmixin.py -> build/lib.macosx-10.9-intel-2.7/lxml/html
copying src/lxml/html/builder.py -> build/lib.macosx-10.9-intel-2.7/lxml/html
copying src/lxml/html/clean.py -> build/lib.macosx-10.9-intel-2.7/lxml/html
copying src/lxml/html/defs.py -> build/lib.macosx-10.9-intel-2.7/lxml/html
copying src/lxml/html/diff.py -> build/lib.macosx-10.9-intel-2.7/lxml/html
copying src/lxml/html/ElementSoup.py -> build/lib.macosx-10.9-intel-2.7/lxml/html
copying src/lxml/html/formfill.py -> build/lib.macosx-10.9-intel-2.7/lxml/html
copying src/lxml/html/html5parser.py -> build/lib.macosx-10.9-intel-2.7/lxml/html
copying src/lxml/html/soupparser.py -> build/lib.macosx-10.9-intel-2.7/lxml/html
copying src/lxml/html/usedoctest.py -> build/lib.macosx-10.9-intel-2.7/lxml/html
creating build/lib.macosx-10.9-intel-2.7/lxml/isoschematron
copying src/lxml/isoschematron/__init__.py -> build/lib.macosx-10.9-intel-2.7/lxml/isoschematron
copying src/lxml/lxml.etree.h -> build/lib.macosx-10.9-intel-2.7/lxml
copying src/lxml/lxml.etree_api.h -> build/lib.macosx-10.9-intel-2.7/lxml
copying src/lxml/includes/c14n.pxd -> build/lib.macosx-10.9-intel-2.7/lxml/includes
copying src/lxml/includes/config.pxd -> build/lib.macosx-10.9-intel-2.7/lxml/includes
copying src/lxml/includes/dtdvalid.pxd -> build/lib.macosx-10.9-intel-2.7/lxml/includes
copying src/lxml/includes/etreepublic.pxd -> build/lib.macosx-10.9-intel-2.7/lxml/includes
copying src/lxml/includes/htmlparser.pxd -> build/lib.macosx-10.9-intel-2.7/lxml/includes
copying src/lxml/includes/relaxng.pxd -> build/lib.macosx-10.9-intel-2.7/lxml/includes
copying src/lxml/includes/schematron.pxd -> build/lib.macosx-10.9-intel-2.7/lxml/includes
copying src/lxml/includes/tree.pxd -> build/lib.macosx-10.9-intel-2.7/lxml/includes
copying src/lxml/includes/uri.pxd -> build/lib.macosx-10.9-intel-2.7/lxml/includes
copying src/lxml/includes/xinclude.pxd -> build/lib.macosx-10.9-intel-2.7/lxml/includes
copying src/lxml/includes/xmlerror.pxd -> build/lib.macosx-10.9-intel-2.7/lxml/includes
copying src/lxml/includes/xmlparser.pxd -> build/lib.macosx-10.9-intel-2.7/lxml/includes
copying src/lxml/includes/xmlschema.pxd -> build/lib.macosx-10.9-intel-2.7/lxml/includes
copying src/lxml/includes/xpath.pxd -> build/lib.macosx-10.9-intel-2.7/lxml/includes
copying src/lxml/includes/xslt.pxd -> build/lib.macosx-10.9-intel-2.7/lxml/includes
copying src/lxml/includes/etree_defs.h -> build/lib.macosx-10.9-intel-2.7/lxml/includes
copying src/lxml/includes/lxml-version.h -> build/lib.macosx-10.9-intel-2.7/lxml/includes
creating build/lib.macosx-10.9-intel-2.7/lxml/isoschematron/resources
creating build/lib.macosx-10.9-intel-2.7/lxml/isoschematron/resources/rng
copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.macosx-10.9-intel-2.7/lxml/isoschematron/resources/rng
creating build/lib.macosx-10.9-intel-2.7/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -> build/lib.macosx-10.9-intel-2.7/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -> build/lib.macosx-10.9-intel-2.7/lxml/isoschematron/resources/xsl
creating build/lib.macosx-10.9-intel-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl -> build/lib.macosx-10.9-intel-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl -> build/lib.macosx-10.9-intel-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl -> build/lib.macosx-10.9-intel-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl -> build/lib.macosx-10.9-intel-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl -> build/lib.macosx-10.9-intel-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.macosx-10.9-intel-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
running build_ext
building 'lxml.etree' extension
creating build/temp.macosx-10.9-intel-2.7
creating build/temp.macosx-10.9-intel-2.7/src
creating build/temp.macosx-10.9-intel-2.7/src/lxml
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/usr/include/libxml2 -I/private/tmp/pip_build_root/lxml/src/lxml/includes -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.macosx-10.9-intel-2.7/src/lxml/lxml.etree.o -w -flat_namespace
You have not agreed to the Xcode license agreements, please run 'xcodebuild -license' (for user-level acceptance) or 'sudo xcodebuild -license' (for system-wide acceptance) from within a Terminal window to review and agree to the Xcode license agreements.
error: command 'cc' failed with exit status 69
----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/tmp/pip_build_root/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-l6wwGK-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/tmp/pip_build_root/lxml
Can anybody please help?
The problem was this part:
You have not agreed to the Xcode license agreements, please run 'xcodebuild -license' (for user-level acceptance) or 'sudo xcodebuild -license' (for system-wide acceptance) from within a Terminal window to review and agree to the Xcode license agreements.
Running sudo xcodebuild -license and reinstalling scrapy solved the problem.

Categories