I am trying to get python-pptx installed for Python 3 on a server machine (Red Hat 4.1.2-52). I'm having some trouble installing its dependency, lxml. I've tried to install all of the dependencies separately (as suggested here).
# sudo yum install -y gcc libxml2 libxml2-devel libxslt libxslt-devel python-devel
Setting up Install Process
Package gcc-4.1.2-55.el5.x86_64 already installed and latest version
Package libxml2-2.6.26-2.1.25.0.1.el5_11.x86_64 already installed and latest version
Package libxml2-2.6.26-2.1.25.0.1.el5_11.i386 already installed and latest version
Package libxml2-devel-2.6.26-2.1.25.0.1.el5_11.x86_64 already installed and latest version
Package libxml2-devel-2.6.26-2.1.25.0.1.el5_11.i386 already installed and latest version
Package libxslt-1.1.17-4.0.1.el5_8.3.x86_64 already installed and latest version
Package libxslt-1.1.17-4.0.1.el5_8.3.i386 already installed and latest version
Package libxslt-devel-1.1.17-4.0.1.el5_8.3.x86_64 already installed and latest version
Package libxslt-devel-1.1.17-4.0.1.el5_8.3.i386 already installed and latest version
Package python-devel-2.4.3-56.el5.x86_64 already installed and latest version
Package python-devel-2.4.3-56.el5.i386 already installed and latest version
Nothing to do
Here's the full traceback from # pip install lxml.
Downloading/unpacking lxml
Downloading lxml-3.4.4.tar.gz (3.5MB): 3.5MB downloaded
Running setup.py (path:/tmp/pip_build_root/lxml/setup.py) egg_info for package lxml
Building lxml version 3.4.4.
Building without Cython.
Using build configuration of libxslt 1.1.17
Minimum required version of libxslt is 1.1.17, found 1.1.23
Building against libxml2/libxslt in the following directory: /usr/lib64
/usr/local/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
warning: no previously-included files found matching '*.py'
Installing collected packages: lxml
Running setup.py install for lxml
Building lxml version 3.4.4.
Building without Cython.
Using build configuration of libxslt 1.1.17
Minimum required version of libxslt is 1.1.17, found 1.1.23
Building against libxml2/libxslt in the following directory: /usr/lib64
building 'lxml.etree' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/libxml2 -I/tmp/pip_build_root/lxml/src/lxml/includes -I/usr/local/include/python3.4m -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-3.4/src/lxml/lxml.etree.o -w
In file included from src/lxml/lxml.etree.c:239:
/tmp/pip_build_root/lxml/src/lxml/includes/etree_defs.h:19:4: error: #error minimum required version of libxml2 is 2.7.0
/tmp/pip_build_root/lxml/src/lxml/includes/etree_defs.h:28:4: error: #error minimum required version of libxslt is 1.1.23
src/lxml/lxml.etree.c: In function ‘__pyx_pf_4lxml_5etree_9XMLParser___init__’:
src/lxml/lxml.etree.c:103187: error: ‘XML_PARSE_HUGE’ undeclared (first use in this function)
src/lxml/lxml.etree.c:103187: error: (Each undeclared identifier is reported only once
src/lxml/lxml.etree.c:103187: error: for each function it appears in.)
src/lxml/lxml.etree.c: In function ‘__pyx_pf_4lxml_5etree_10Schematron_6__call__’:
src/lxml/lxml.etree.c:177038: error: ‘XML_SCHEMATRON_OUT_ERROR’ undeclared (first use in this function)
/usr/local/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
error: command 'gcc' failed with exit status 1
Complete output from command /usr/local/bin/python3.4 -c "import setuptools, tokenize;__file__='/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-mrgef1x6-record/install-record.txt --single-version-externally-managed --compile:
Building lxml version 3.4.4.
Building without Cython.
Using build configuration of libxslt 1.1.17
Minimum required version of libxslt is 1.1.17, found 1.1.23
Building against libxml2/libxslt in the following directory: /usr/lib64
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.4
creating build/lib.linux-x86_64-3.4/lxml
copying src/lxml/builder.py -> build/lib.linux-x86_64-3.4/lxml
copying src/lxml/pyclasslookup.py -> build/lib.linux-x86_64-3.4/lxml
copying src/lxml/ElementInclude.py -> build/lib.linux-x86_64-3.4/lxml
copying src/lxml/doctestcompare.py -> build/lib.linux-x86_64-3.4/lxml
copying src/lxml/__init__.py -> build/lib.linux-x86_64-3.4/lxml
copying src/lxml/usedoctest.py -> build/lib.linux-x86_64-3.4/lxml
copying src/lxml/_elementpath.py -> build/lib.linux-x86_64-3.4/lxml
copying src/lxml/cssselect.py -> build/lib.linux-x86_64-3.4/lxml
copying src/lxml/sax.py -> build/lib.linux-x86_64-3.4/lxml
creating build/lib.linux-x86_64-3.4/lxml/includes
copying src/lxml/includes/__init__.py -> build/lib.linux-x86_64-3.4/lxml/includes
creating build/lib.linux-x86_64-3.4/lxml/html
copying src/lxml/html/html5parser.py -> build/lib.linux-x86_64-3.4/lxml/html
copying src/lxml/html/soupparser.py -> build/lib.linux-x86_64-3.4/lxml/html
copying src/lxml/html/builder.py -> build/lib.linux-x86_64-3.4/lxml/html
copying src/lxml/html/ElementSoup.py -> build/lib.linux-x86_64-3.4/lxml/html
copying src/lxml/html/_setmixin.py -> build/lib.linux-x86_64-3.4/lxml/html
copying src/lxml/html/defs.py -> build/lib.linux-x86_64-3.4/lxml/html
copying src/lxml/html/diff.py -> build/lib.linux-x86_64-3.4/lxml/html
copying src/lxml/html/_diffcommand.py -> build/lib.linux-x86_64-3.4/lxml/html
copying src/lxml/html/formfill.py -> build/lib.linux-x86_64-3.4/lxml/html
copying src/lxml/html/__init__.py -> build/lib.linux-x86_64-3.4/lxml/html
copying src/lxml/html/usedoctest.py -> build/lib.linux-x86_64-3.4/lxml/html
copying src/lxml/html/clean.py -> build/lib.linux-x86_64-3.4/lxml/html
copying src/lxml/html/_html5builder.py -> build/lib.linux-x86_64-3.4/lxml/html
creating build/lib.linux-x86_64-3.4/lxml/isoschematron
copying src/lxml/isoschematron/__init__.py -> build/lib.linux-x86_64-3.4/lxml/isoschematron
copying src/lxml/lxml.etree.h -> build/lib.linux-x86_64-3.4/lxml
copying src/lxml/lxml.etree_api.h -> build/lib.linux-x86_64-3.4/lxml
copying src/lxml/includes/c14n.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
copying src/lxml/includes/xinclude.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
copying src/lxml/includes/dtdvalid.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
copying src/lxml/includes/xmlerror.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
copying src/lxml/includes/xmlschema.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
copying src/lxml/includes/etreepublic.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
copying src/lxml/includes/xpath.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
copying src/lxml/includes/uri.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
copying src/lxml/includes/xmlparser.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
copying src/lxml/includes/schematron.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
copying src/lxml/includes/tree.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
copying src/lxml/includes/xslt.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
copying src/lxml/includes/htmlparser.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
copying src/lxml/includes/config.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
copying src/lxml/includes/relaxng.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
copying src/lxml/includes/etree_defs.h -> build/lib.linux-x86_64-3.4/lxml/includes
copying src/lxml/includes/lxml-version.h -> build/lib.linux-x86_64-3.4/lxml/includes
creating build/lib.linux-x86_64-3.4/lxml/isoschematron/resources
creating build/lib.linux-x86_64-3.4/lxml/isoschematron/resources/rng
copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.linux-x86_64-3.4/lxml/isoschematron/resources/rng
creating build/lib.linux-x86_64-3.4/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -> build/lib.linux-x86_64-3.4/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -> build/lib.linux-x86_64-3.4/lxml/isoschematron/resources/xsl
creating build/lib.linux-x86_64-3.4/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-3.4/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-3.4/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-3.4/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-3.4/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-3.4/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.linux-x86_64-3.4/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
running build_ext
building 'lxml.etree' extension
creating build/temp.linux-x86_64-3.4
creating build/temp.linux-x86_64-3.4/src
creating build/temp.linux-x86_64-3.4/src/lxml
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/libxml2 -I/tmp/pip_build_root/lxml/src/lxml/includes -I/usr/local/include/python3.4m -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-3.4/src/lxml/lxml.etree.o -w
In file included from src/lxml/lxml.etree.c:239:
/tmp/pip_build_root/lxml/src/lxml/includes/etree_defs.h:19:4: error: #error minimum required version of libxml2 is 2.7.0
/tmp/pip_build_root/lxml/src/lxml/includes/etree_defs.h:28:4: error: #error minimum required version of libxslt is 1.1.23
src/lxml/lxml.etree.c: In function ‘__pyx_pf_4lxml_5etree_9XMLParser___init__’:
src/lxml/lxml.etree.c:103187: error: ‘XML_PARSE_HUGE’ undeclared (first use in this function)
src/lxml/lxml.etree.c:103187: error: (Each undeclared identifier is reported only once
src/lxml/lxml.etree.c:103187: error: for each function it appears in.)
src/lxml/lxml.etree.c: In function ‘__pyx_pf_4lxml_5etree_10Schematron_6__call__’:
src/lxml/lxml.etree.c:177038: error: ‘XML_SCHEMATRON_OUT_ERROR’ undeclared (first use in this function)
/usr/local/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
error: command 'gcc' failed with exit status 1
Any ideas what I might be doing wrong? Thanks very much in advance!
If anything, this is a duplicate of this post which also went unanswered...but we got slightly different error messages.
I don't use Red Hat, but my recommendation for you is to follow the instructions from here:
sudo yum install make automake gcc gcc-c++ kernel-devel git-core -y
sudo yum install python-devel -y
sudo curl -o /tmp/ez_setup.py https://sources.rhodecode.com/setuptools/raw/bootstrap/ez_setup.py
sudo /usr/bin/python /tmp/ez_setup.py
sudo /usr/bin/easy_install pip
sudo rm setuptools-*.tar.gz
sudo pip install -i https://pypi.rhodecode.com/ --upgrade pip
sudo pip install virtualenv
The idea here is that you would install a virtual environment and work with pip packages under it, which is easy and more reliable in terms of dependencies.
Please don't use sources.rhodecode.com and pypi.rhodecode.com they will soon disappear :) We're no longer mirror our python stuff internally at RhodeCode.
Related
I am trying to use the pip install mysql-python command and I get the error below. I have no idea what this means someone please help. I have already updated my verison of pip and setuptools and wheels so I am at a loss. I get a big error message but only have the first half presented below.
C:\Users\Alex\Desktop\Cornell Stuff\Computer Programs\WinPython-64bit-
3.4.3.3\python-3.4.3.amd64>pip install mysql-python
Collecting mysql-python
Downloading MySQL-python-1.2.5.zip (108kB)
100% |################################| 112kB 179kB/s
Building wheels for collected packages: mysql-python
Running setup.py bdist_wheel for mysql-python ... error
Complete output from command "C:\Users\Alex\Desktop\Cornell Stuff\Computer
Programs\WinPython-64bit-3.4.3.3\python-3.4.3.amd64\python.exe" -u -c
"import setuptools,
tokenize;__file__='C:\\Users\\Alex\\AppData\\Local\\Temp\\pip-build-
1kxb8j7_\\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
C:\Users\Alex\AppData\Local\Temp\tmpzz01n6ylpip-wheel- --python-tag cp34:
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.4
copying _mysql_exceptions.py -> build\lib.win-amd64-3.4
creating build\lib.win-amd64-3.4\MySQLdb
copying MySQLdb\__init__.py -> build\lib.win-amd64-3.4\MySQLdb
copying MySQLdb\converters.py -> build\lib.win-amd64-3.4\MySQLdb
copying MySQLdb\connections.py -> build\lib.win-amd64-3.4\MySQLdb
copying MySQLdb\cursors.py -> build\lib.win-amd64-3.4\MySQLdb
copying MySQLdb\release.py -> build\lib.win-amd64-3.4\MySQLdb
copying MySQLdb\times.py -> build\lib.win-amd64-3.4\MySQLdb
creating build\lib.win-amd64-3.4\MySQLdb\constants
copying MySQLdb\constants\__init__.py -> build\lib.win-amd64-
3.4\MySQLdb\constants
copying MySQLdb\constants\CR.py -> build\lib.win-amd64-
3.4\MySQLdb\constants
copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win-amd64-
3.4\MySQLdb\constants
copying MySQLdb\constants\ER.py -> build\lib.win-amd64-
3.4\MySQLdb\constants
copying MySQLdb\constants\FLAG.py -> build\lib.win-amd64-
3.4\MySQLdb\constants
copying MySQLdb\constants\REFRESH.py -> build\lib.win-amd64-
3.4\MySQLdb\constants
copying MySQLdb\constants\CLIENT.py -> build\lib.win-amd64-
3.4\MySQLdb\constants
running build_ext
building '_mysql' extension
creating build\temp.win-amd64-3.4
creating build\temp.win-amd64-3.4\Release
C:\Users\Alex\Desktop\Cornell Stuff\Computer Programs\WinPython-64bit-
3.4.3.3\python-3.4.3.amd64\..\tools\mingw32\bin\gcc.exe -mdll -O -DMS_WIN64
-Wall -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 "-IC:\Program
Files (x86)\MySQL\MySQL Connector C 6.0.2\include" "-
IC:\Users\Alex\Desktop\Cornell Stuff\Computer Programs\WinPython-64bit-
3.4.3.3\python-3.4.3.amd64\include" "-IC:\Users\Alex\Desktop\Cornell
Stuff\Computer Programs\WinPython-64bit-3.4.3.3\python-3.4.3.amd64\include"
-c _mysql.c -o build\temp.win-amd64-3.4\Release\_mysql.o /Zl
gcc: error: /Zl: No such file or directory
error: command 'C:\\Users\\Alex\\Desktop\\Cornell Stuff\\Computer
Programs\\WinPython-64bit-3.4.3.3\\python-
3.4.3.amd64\\..\\tools\\mingw32\\bin\\gcc.exe' failed with exit status 1
----------------------------------------
Failed building wheel for mysql-python
Running setup.py clean for mysql-python
Failed to build mysql-python
it's written there that mysql-python may not be python-3 compatible : https://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python
you may rather try, for example: "pip install mysql-connector-python"
I am attempting to run a website that is built on CherryPy and working on deploying it in a new environment with Python 2.7.13 and been working to get everything necessary setup. Currently I am stuck on importing pyOpenSSL to enable SSL support but pyOpenSSL is unable to install because a required module, Cryptography, is not installing. So I have been working on installing just Cryptography for the time being as all other required modules are installed.
Earlier, after I had used pip2.7 install cryptography > /tmp/piplog.txt to attempt to install the module and log the whole output to a separate file and I was able to see errors like these
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include/python2.7 -c build/temp.linux-x86_64-2.7/_openssl.c -o build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7/_openssl.o
build/temp.linux-x86_64-2.7/_openssl.c:434:30: error: openssl/opensslv.h: No such file or directory
build/temp.linux-x86_64-2.7/_openssl.c:448:27: error: openssl/e_os2.h: No such file or directory
build/temp.linux-x86_64-2.7/_openssl.c:468:25: error: openssl/aes.h: No such file or directory
build/temp.linux-x86_64-2.7/_openssl.c:471:26: error: openssl/asn1.h: No such file or directory
This lead me to see where those files currently actually were installed with find / -name opensslv.h and then I copied the files from my install of openssl with
cp -rf /usr/local/ssl/inclue/openssl/* /usr/local/include/python2.7/openssl
so that the cryptography module would find the appropriate files and it seems like the installer got a bit farther, but I am not able to currently make sense of the errors I am seeing in the output. The full output is below
Collecting cryptography
Using cached cryptography-1.9.tar.gz
Requirement already satisfied: idna>=2.1 in /usr/local/lib/python2.7/site-packages (from cryptography)
Requirement already satisfied: asn1crypto>=0.21.0 in /usr/local/lib/python2.7/site-packages (from cryptography)
Requirement already satisfied: six>=1.4.1 in /usr/local/lib/python2.7/site-packages/six-1.10.0-py2.7.egg (from cryptography)
Requirement already satisfied: enum34 in /usr/local/lib/python2.7/site-packages (from cryptography)
Requirement already satisfied: ipaddress in /usr/local/lib/python2.7/site-packages (from cryptography)
Requirement already satisfied: cffi>=1.7 in /usr/local/lib/python2.7/site-packages (from cryptography)
Requirement already satisfied: pycparser in /usr/local/lib/python2.7/site-packages (from cffi>=1.7->cryptography)
Installing collected packages: cryptography
Running setup.py install for cryptography: started
Running setup.py install for cryptography: finished with status 'error'
Complete output from command /usr/local/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-VvLC6F/cryptography/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-iAcBaS-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/cryptography
copying src/cryptography/exceptions.py -> build/lib.linux-x86_64-2.7/cryptography
copying src/cryptography/__init__.py -> build/lib.linux-x86_64-2.7/cryptography
copying src/cryptography/utils.py -> build/lib.linux-x86_64-2.7/cryptography
copying src/cryptography/__about__.py -> build/lib.linux-x86_64-2.7/cryptography
copying src/cryptography/fernet.py -> build/lib.linux-x86_64-2.7/cryptography
creating build/lib.linux-x86_64-2.7/cryptography/x509
copying src/cryptography/x509/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/x509
copying src/cryptography/x509/extensions.py -> build/lib.linux-x86_64-2.7/cryptography/x509
copying src/cryptography/x509/oid.py -> build/lib.linux-x86_64-2.7/cryptography/x509
copying src/cryptography/x509/base.py -> build/lib.linux-x86_64-2.7/cryptography/x509
copying src/cryptography/x509/general_name.py -> build/lib.linux-x86_64-2.7/cryptography/x509
copying src/cryptography/x509/name.py -> build/lib.linux-x86_64-2.7/cryptography/x509
copying src/cryptography/x509/certificate_transparency.py -> build/lib.linux-x86_64-2.7/cryptography/x509
creating build/lib.linux-x86_64-2.7/cryptography/hazmat
copying src/cryptography/hazmat/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat
creating build/lib.linux-x86_64-2.7/cryptography/hazmat/backends
copying src/cryptography/hazmat/backends/interfaces.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends
copying src/cryptography/hazmat/backends/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends
creating build/lib.linux-x86_64-2.7/cryptography/hazmat/bindings
copying src/cryptography/hazmat/bindings/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/bindings
creating build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/interfaces.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/serialization.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/padding.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/mac.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/cmac.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/constant_time.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/hashes.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/keywrap.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/hmac.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives
creating build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/rsa.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/ciphers.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/dh.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/cmac.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/dsa.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/decode_asn1.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/ec.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/x509.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/backend.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/utils.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/hashes.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/hmac.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/encode_asn1.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl
creating build/lib.linux-x86_64-2.7/cryptography/hazmat/bindings/openssl
copying src/cryptography/hazmat/bindings/openssl/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/bindings/openssl
copying src/cryptography/hazmat/bindings/openssl/binding.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/bindings/openssl
copying src/cryptography/hazmat/bindings/openssl/_conditional.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/bindings/openssl
creating build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/twofactor
copying src/cryptography/hazmat/primitives/twofactor/totp.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/twofactor
copying src/cryptography/hazmat/primitives/twofactor/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/twofactor
copying src/cryptography/hazmat/primitives/twofactor/hotp.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/twofactor
copying src/cryptography/hazmat/primitives/twofactor/utils.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/twofactor
creating build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/rsa.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/dh.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/padding.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/dsa.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/ec.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/utils.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/asymmetric
creating build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/ciphers
copying src/cryptography/hazmat/primitives/ciphers/algorithms.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/ciphers
copying src/cryptography/hazmat/primitives/ciphers/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/ciphers
copying src/cryptography/hazmat/primitives/ciphers/base.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/ciphers
copying src/cryptography/hazmat/primitives/ciphers/modes.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/ciphers
creating build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/x963kdf.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/kbkdf.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/pbkdf2.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/concatkdf.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/hkdf.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/scrypt.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/kdf
running egg_info
writing requirements to src/cryptography.egg-info/requires.txt
writing src/cryptography.egg-info/PKG-INFO
writing top-level names to src/cryptography.egg-info/top_level.txt
writing dependency_links to src/cryptography.egg-info/dependency_links.txt
writing entry points to src/cryptography.egg-info/entry_points.txt
warning: manifest_maker: standard file '-c' not found
reading manifest file 'src/cryptography.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs/_build'
warning: no previously-included files matching '*' found under directory 'vectors'
writing manifest file 'src/cryptography.egg-info/SOURCES.txt'
running build_ext
generating cffi module 'build/temp.linux-x86_64-2.7/_padding.c'
creating build/temp.linux-x86_64-2.7
generating cffi module 'build/temp.linux-x86_64-2.7/_constant_time.c'
generating cffi module 'build/temp.linux-x86_64-2.7/_openssl.c'
building '_openssl' extension
creating build/temp.linux-x86_64-2.7/build
creating build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include/python2.7 -c build/temp.linux-x86_64-2.7/_openssl.c -o build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7/_openssl.o
build/temp.linux-x86_64-2.7/_openssl.c: In function ‘_setup_ssl_threads’:
build/temp.linux-x86_64-2.7/_openssl.c:3400: warning: comparison is always false due to limited range of data type
gcc -pthread -shared build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7/_openssl.o -lssl -lcrypto -o build/lib.linux-x86_64-2.7/cryptography/hazmat/bindings/_openssl.so
/usr/bin/ld: cannot find -lssl
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
----------------------------------------
Well, it seems that I was running into a similar error as before since once I added symbolic links to the libssl.so and libcrypto.so files to my /usr/lib/ directory. As root I did
ln -s /usr/local/ssl/lib/libssl.so /usr/lib/libssl.so
ln -s /usr/local/ssl/lib/libcrypto.so /usr/lib/libcrypto.so
After that I was able to successfully do pip2.7 install cryptography and pip2.7 install pyOpenSSL
Now when I start up my cherrypy website I no longer get errors about the pyOpenSSL being required.
Possibly some rookie mistakes with my previous software install caused the files to be not where the new installer was looking, or I should have known to put the symbolic link there to avoid these types of issues. But a good learning experience
I am having following issue when installing mitmproxy through pip.
I have tried other fixed related to egg error. Here on stack overflow.
Can't install via pip because of egg_info error
pip install matplotlib fails: 'cannot build package freetype; "python setup.py egg_info" failed with error code 1'
104:bin user129856$ sudo pip install mitmproxy
The directory '/Users/alokchoudhary/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/alokchoudhary/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting mitmproxy
/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Downloading mitmproxy-0.12.1.tar.gz (6.5MB)
100% |████████████████████████████████| 6.5MB 18kB/s
Collecting pyperclip>=1.5.8 (from mitmproxy)
Downloading pyperclip-1.5.11.zip
Collecting pyasn1>0.1.2 (from mitmproxy)
Downloading pyasn1-0.1.8.tar.gz (75kB)
100% |████████████████████████████████| 77kB 827kB/s
Collecting tornado>=4.0.2 (from mitmproxy)
Downloading tornado-4.2.tar.gz (433kB)
100% |████████████████████████████████| 434kB 260kB/s
Collecting lxml>=3.3.6 (from mitmproxy)
Downloading lxml-3.4.4.tar.gz (3.5MB)
100% |████████████████████████████████| 3.5MB 32kB/s
Collecting netlib<0.13,>=0.12 (from mitmproxy)
Downloading netlib-0.12.1.tar.gz (64kB)
100% |████████████████████████████████| 65kB 729kB/s
Complete output from command python setup.py egg_info:
warning: no files found matching 'OpenSSL/RATIONALE'
warning: no previously-included files found matching 'leakcheck'
warning: no previously-included files matching '*.py' found under directory 'leakcheck'
warning: no previously-included files matching '*.pem' found under directory 'leakcheck'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
no previously-included directories found matching 'doc/_build'
zip_safe flag not set; analyzing archive contents...
Installed /private/tmp/pip-build-wOHXdq/netlib/.eggs/pyOpenSSL-0.15.1-py2.7.egg
Searching for cffi
Reading https://pypi.python.org/simple/cffi/
Best match: cffi 1.1.2
Downloading https://pypi.python.org/packages/source/c/cffi/cffi-1.1.2.tar.gz#md5=ca6e6c45b45caa87aee9adc7c796eaea
Processing cffi-1.1.2.tar.gz
Writing /tmp/easy_install-_e2qwn/cffi-1.1.2/setup.cfg
Running cffi-1.1.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-_e2qwn/cffi-1.1.2/egg-dist-tmp-382ExN
c/_cffi_backend.c:13:10: fatal error: 'ffi.h' file not found
#include <ffi.h>
^
1 error generated.
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/private/tmp/pip-build-wOHXdq/netlib/setup.py", line 87, in <module>
"install": CFFIInstall,
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 112, in setup
_setup_distribution = dist = klass(attrs)
File "build/bdist.macosx-10.10-intel/egg/setuptools/dist.py", line 268, in __init__
File "build/bdist.macosx-10.10-intel/egg/setuptools/dist.py", line 313, in fetch_build_eggs
File "build/bdist.macosx-10.10-intel/egg/pkg_resources/__init__.py", line 836, in resolve
File "build/bdist.macosx-10.10-intel/egg/pkg_resources/__init__.py", line 1081, in best_match
File "build/bdist.macosx-10.10-intel/egg/pkg_resources/__init__.py", line 1093, in obtain
File "build/bdist.macosx-10.10-intel/egg/setuptools/dist.py", line 380, in fetch_build_egg
File "build/bdist.macosx-10.10-intel/egg/setuptools/command/easy_install.py", line 629, in easy_install
File "build/bdist.macosx-10.10-intel/egg/setuptools/command/easy_install.py", line 659, in install_item
File "build/bdist.macosx-10.10-intel/egg/setuptools/command/easy_install.py", line 842, in install_eggs
File "build/bdist.macosx-10.10-intel/egg/setuptools/command/easy_install.py", line 1070, in build_and_install
File "build/bdist.macosx-10.10-intel/egg/setuptools/command/easy_install.py", line 1058, in run_setup
distutils.errors.DistutilsError: Setup script exited with error: command 'cc' failed with exit status 1
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-build-wOHXdq/netlib
Updated after first response for libffi:
After Installing libffi, it started breaking on libxml. I found the lxml on pip.
and its break again and looking for libxml :(
104:~ user2368563$ brew install libxml
Error: No available formula for libxml
Searching formulae...
libxml++ libxml2 libxmlsec1
Searching taps...
homebrew/versions/libxml278
104:~ user2368563$ brew install libxml2
Warning: libxml2-2.9.2 already installed
104:bin user2368563$ sudo pip install lxml
The directory '/Users/alokchoudhary/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/alokchoudhary/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting lxml
/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Downloading lxml-3.4.4.tar.gz (3.5MB)
100% |████████████████████████████████| 3.5MB 116kB/s
Installing collected packages: lxml
Running setup.py install for lxml
Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-bDtXaT/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-gmvCN9-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.4.
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.10-intel-2.7
creating build/lib.macosx-10.10-intel-2.7/lxml
copying src/lxml/__init__.py -> build/lib.macosx-10.10-intel-2.7/lxml
copying src/lxml/_elementpath.py -> build/lib.macosx-10.10-intel-2.7/lxml
copying src/lxml/builder.py -> build/lib.macosx-10.10-intel-2.7/lxml
copying src/lxml/cssselect.py -> build/lib.macosx-10.10-intel-2.7/lxml
copying src/lxml/doctestcompare.py -> build/lib.macosx-10.10-intel-2.7/lxml
copying src/lxml/ElementInclude.py -> build/lib.macosx-10.10-intel-2.7/lxml
copying src/lxml/pyclasslookup.py -> build/lib.macosx-10.10-intel-2.7/lxml
copying src/lxml/sax.py -> build/lib.macosx-10.10-intel-2.7/lxml
copying src/lxml/usedoctest.py -> build/lib.macosx-10.10-intel-2.7/lxml
creating build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/__init__.py -> build/lib.macosx-10.10-intel-2.7/lxml/includes
creating build/lib.macosx-10.10-intel-2.7/lxml/html
copying src/lxml/html/__init__.py -> build/lib.macosx-10.10-intel-2.7/lxml/html
copying src/lxml/html/_diffcommand.py -> build/lib.macosx-10.10-intel-2.7/lxml/html
copying src/lxml/html/_html5builder.py -> build/lib.macosx-10.10-intel-2.7/lxml/html
copying src/lxml/html/_setmixin.py -> build/lib.macosx-10.10-intel-2.7/lxml/html
copying src/lxml/html/builder.py -> build/lib.macosx-10.10-intel-2.7/lxml/html
copying src/lxml/html/clean.py -> build/lib.macosx-10.10-intel-2.7/lxml/html
copying src/lxml/html/defs.py -> build/lib.macosx-10.10-intel-2.7/lxml/html
copying src/lxml/html/diff.py -> build/lib.macosx-10.10-intel-2.7/lxml/html
copying src/lxml/html/ElementSoup.py -> build/lib.macosx-10.10-intel-2.7/lxml/html
copying src/lxml/html/formfill.py -> build/lib.macosx-10.10-intel-2.7/lxml/html
copying src/lxml/html/html5parser.py -> build/lib.macosx-10.10-intel-2.7/lxml/html
copying src/lxml/html/soupparser.py -> build/lib.macosx-10.10-intel-2.7/lxml/html
copying src/lxml/html/usedoctest.py -> build/lib.macosx-10.10-intel-2.7/lxml/html
creating build/lib.macosx-10.10-intel-2.7/lxml/isoschematron
copying src/lxml/isoschematron/__init__.py -> build/lib.macosx-10.10-intel-2.7/lxml/isoschematron
copying src/lxml/lxml.etree.h -> build/lib.macosx-10.10-intel-2.7/lxml
copying src/lxml/lxml.etree_api.h -> build/lib.macosx-10.10-intel-2.7/lxml
copying src/lxml/includes/c14n.pxd -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/config.pxd -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/dtdvalid.pxd -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/etreepublic.pxd -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/htmlparser.pxd -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/relaxng.pxd -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/schematron.pxd -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/tree.pxd -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/uri.pxd -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/xinclude.pxd -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/xmlerror.pxd -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/xmlparser.pxd -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/xmlschema.pxd -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/xpath.pxd -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/xslt.pxd -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/etree_defs.h -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/lxml-version.h -> build/lib.macosx-10.10-intel-2.7/lxml/includes
creating build/lib.macosx-10.10-intel-2.7/lxml/isoschematron/resources
creating build/lib.macosx-10.10-intel-2.7/lxml/isoschematron/resources/rng
copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.macosx-10.10-intel-2.7/lxml/isoschematron/resources/rng
creating build/lib.macosx-10.10-intel-2.7/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -> build/lib.macosx-10.10-intel-2.7/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -> build/lib.macosx-10.10-intel-2.7/lxml/isoschematron/resources/xsl
creating build/lib.macosx-10.10-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.10-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.10-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.10-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.10-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.10-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.10-intel-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
running build_ext
building 'lxml.etree' extension
creating build/temp.macosx-10.10-intel-2.7
creating build/temp.macosx-10.10-intel-2.7/src
creating build/temp.macosx-10.10-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-bDtXaT/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.10-intel-2.7/src/lxml/lxml.etree.o -w -flat_namespace
In file included from src/lxml/lxml.etree.c:239:
/private/tmp/pip-build-bDtXaT/lxml/src/lxml/includes/etree_defs.h:14:10: fatal error: 'libxml/xmlversion.h' file not found
#include "libxml/xmlversion.h"
^
1 error generated.
error: command 'cc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-bDtXaT/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-gmvCN9-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-bDtXaT/lxml
If you read through your log carefully you might spot this line:
c/_cffi_backend.c:13:10: fatal error: 'ffi.h' file not found
The "fatal error" part is especially important. :)
This means that the ffi headers couldn't be located by your compiler. I'm not sure how to do it since I'm not a Mac user but maybe homebrew could help you, or Google. To me it seems like you should install homebrew and then just run:
brew install libffi
Then try pip again.
Edit
The full list of dependencies are:
python
libffi
libssl
libxml2
libxslt1
So you'll need all those, and their headers, if you want to continue down this path.
An easier solution is to download pre-built binaries for your Mac, from mitmproxy.org (OSX Mountain Lion and later). I found this info in the installation docs.
I was installing h5py on an Ubuntu server. However it seems to return an error that h5py.h is not found. It gives the same error message when I install it using pip or the setup.py file. What am I missing here?
I have Numpy version 1.8.1, which higher than the required version of 1.6 or above.
The complete output is as follows:
van#Hulk:~/h5py-2.3.1⟫ sudo python setup.py install
libhdf5.so: cannot open shared object file: No such file or directory
HDF5 autodetection failed; building for 1.8.4+
running install
running bdist_egg
running egg_info
writing h5py.egg-info/PKG-INFO
writing top-level names to h5py.egg-info/top_level.txt
writing dependency_links to h5py.egg-info/dependency_links.txt
reading manifest file 'h5py.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.c' under directory 'win_include'
warning: no files found matching '*.h' under directory 'win_include'
writing manifest file 'h5py.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/h5py
copying h5py/ipy_completer.py -> build/lib.linux-x86_64-2.7/h5py
copying h5py/__init__.py -> build/lib.linux-x86_64-2.7/h5py
copying h5py/version.py -> build/lib.linux-x86_64-2.7/h5py
copying h5py/highlevel.py -> build/lib.linux-x86_64-2.7/h5py
creating build/lib.linux-x86_64-2.7/h5py/_hl
copying h5py/_hl/group.py -> build/lib.linux-x86_64-2.7/h5py/_hl
copying h5py/_hl/files.py -> build/lib.linux-x86_64-2.7/h5py/_hl
copying h5py/_hl/selections.py -> build/lib.linux-x86_64-2.7/h5py/_hl
copying h5py/_hl/__init__.py -> build/lib.linux-x86_64-2.7/h5py/_hl
copying h5py/_hl/filters.py -> build/lib.linux-x86_64-2.7/h5py/_hl
copying h5py/_hl/base.py -> build/lib.linux-x86_64-2.7/h5py/_hl
copying h5py/_hl/dims.py -> build/lib.linux-x86_64-2.7/h5py/_hl
copying h5py/_hl/datatype.py -> build/lib.linux-x86_64-2.7/h5py/_hl
copying h5py/_hl/dataset.py -> build/lib.linux-x86_64-2.7/h5py/_hl
copying h5py/_hl/selections2.py -> build/lib.linux-x86_64-2.7/h5py/_hl
copying h5py/_hl/attrs.py -> build/lib.linux-x86_64-2.7/h5py/_hl
creating build/lib.linux-x86_64-2.7/h5py/tests
copying h5py/tests/test_selections.py -> build/lib.linux-x86_64-2.7/h5py/tests
copying h5py/tests/test_group.py -> build/lib.linux-x86_64-2.7/h5py/tests
copying h5py/tests/test_h5.py -> build/lib.linux-x86_64-2.7/h5py/tests
copying h5py/tests/test_attrs.py -> build/lib.linux-x86_64-2.7/h5py/tests
copying h5py/tests/test_objects.py -> build/lib.linux-x86_64-2.7/h5py/tests
copying h5py/tests/test_slicing.py -> build/lib.linux-x86_64-2.7/h5py/tests
copying h5py/tests/test_h5t.py -> build/lib.linux-x86_64-2.7/h5py/tests
copying h5py/tests/test_datatype.py -> build/lib.linux-x86_64-2.7/h5py/tests
copying h5py/tests/__init__.py -> build/lib.linux-x86_64-2.7/h5py/tests
copying h5py/tests/test_dimension_scales.py -> build/lib.linux-x86_64-2.7/h5py/tests
copying h5py/tests/test_base.py -> build/lib.linux-x86_64-2.7/h5py/tests
copying h5py/tests/test_dataset.py -> build/lib.linux-x86_64-2.7/h5py/tests
copying h5py/tests/test_file.py -> build/lib.linux-x86_64-2.7/h5py/tests
copying h5py/tests/test_h5p.py -> build/lib.linux-x86_64-2.7/h5py/tests
copying h5py/tests/test_attrs_data.py -> build/lib.linux-x86_64-2.7/h5py/tests
copying h5py/tests/common.py -> build/lib.linux-x86_64-2.7/h5py/tests
copying h5py/tests/test_h5f.py -> build/lib.linux-x86_64-2.7/h5py/tests
running build_ext
skipping 'h5py/defs.c' Cython extension (up-to-date)
building 'h5py.defs' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/h5py
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DH5_USE_16_API -I/home/govinda/h5py-2.3.1/lzf -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c h5py/defs.c -o build/temp.linux-x86_64-2.7/h5py/defs.o
In file included from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1761:0,
from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarrayobject.h:17,
from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/arrayobject.h:4,
from h5py/api_compat.h:26,
from h5py/defs.c:342:
/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it by " \
^
In file included from h5py/defs.c:342:0:
h5py/api_compat.h:27:18: fatal error: hdf5.h: No such file or directory
#include "hdf5.h"
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
You need to install libhdf5-dev to get the required header files. Just run
sudo apt-get install libhdf5-dev
and it should install it and its dependencies automatically.
Don't worry about the NumPy warning, it just means that the package developers are using an old version of the API, but everything will still work.
You can use python-h5py.
sudo apt-get install python-h5py
And then in your Python file try:
import h5py
In my case (Ubuntu 15.04) installing libhdf5-dev was not enough.
I had to run:
HDF5_DIR=/usr/lib/x86_64-linux-gnu/hdf5/serial/ pip install h5py
to make it work.
It is generally preferable to use pip instead of installing it manually, since pip will also install all python dependencies. You would still need your header files though.
so:
sudo apt-get install libhdf5-dev
pip install h5py
I had to install both libhdf5-dev and cython3 (Ubuntu 18.04 on arm64 device, Python 3.5).
sudo apt install libhdf5-dev
sudo apt install cython3
I had the vcvarsall.bat problem, so I followed the directions here How to use MinGW's gcc compiler when installing Python package using Pip? .
Now, when using pip install lxml with Python 3.2.2 on Windows 7 I get the following error:
C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\Python32\include -IC:\Pytho
n32\PC -c src/lxml/lxml.etree.c -o build\temp.win32-3.2\Release\src\lxml\lxml.et
ree.o -w
cc1.exe: error: unrecognized command line option '-mno-cygwin'
error: command 'gcc' failed with exit status 1
The entire output:
C:\Python32\Scripts>pip-3.2.exe install lxml
Downloading/unpacking lxml
Real name of requirement lxml is lxml
Downloading lxml-2.3.3.tar.gz (3.1Mb): 3.1Mb downloaded
Running setup.py egg_info for package lxml
Building lxml version 2.3.3.
Building without Cython.
ERROR: b"'xslt-config' is not recognized as an internal or external command,
\r\noperable program or batch file.\r\n"
** make sure the development packages of libxml2 and libxslt are installed *
*
Using build configuration of libxslt
warning: no files found matching 'lxml.etree.c' under directory 'src\lxml'
warning: no files found matching 'lxml.objectify.c' under directory 'src\lxm
l'
warning: no files found matching 'lxml.etree.h' under directory 'src\lxml'
warning: no files found matching 'lxml.etree_api.h' under directory 'src\lxm
l'
warning: no files found matching 'etree_defs.h' under directory 'src\lxml'
warning: no files found matching 'pubkey.asc' under directory 'doc'
warning: no files found matching 'tagpython*.png' under directory 'doc'
warning: no files found matching 'Makefile' under directory 'doc'
Installing collected packages: lxml
Running setup.py install for lxml
Building lxml version 2.3.3.
Building without Cython.
ERROR: b"'xslt-config' is not recognized as an internal or external command,
\r\noperable program or batch file.\r\n"
** make sure the development packages of libxml2 and libxslt are installed *
*
Using build configuration of libxslt
building 'lxml.etree' extension
C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\Python32\include -IC:\P
ython32\PC -c src/lxml/lxml.etree.c -o build\temp.win32-3.2\Release\src\lxml\lxm
l.etree.o -w
cc1.exe: error: unrecognized command line option '-mno-cygwin'
error: command 'gcc' failed with exit status 1
Complete output from command C:\Python32\python.exe -c "import setuptools;__
file__='C:\\Python32\\Scripts\\build\\lxml\\setup.py';exec(compile(open(__file__
).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-ext
ernally-managed --record c:\windows\temp\pip-w4t58y-record\install-record.txt:
Building lxml version 2.3.3.
Building without Cython.
ERROR: b"'xslt-config' is not recognized as an internal or external command,\r\n
operable program or batch file.\r\n"
** make sure the development packages of libxml2 and libxslt are installed **
Using build configuration of libxslt
running install
running build
running build_py
creating build
creating build\lib.win32-3.2
creating build\lib.win32-3.2\lxml
copying src\lxml\builder.py -> build\lib.win32-3.2\lxml
copying src\lxml\cssselect.py -> build\lib.win32-3.2\lxml
copying src\lxml\doctestcompare.py -> build\lib.win32-3.2\lxml
copying src\lxml\ElementInclude.py -> build\lib.win32-3.2\lxml
copying src\lxml\pyclasslookup.py -> build\lib.win32-3.2\lxml
copying src\lxml\sax.py -> build\lib.win32-3.2\lxml
copying src\lxml\usedoctest.py -> build\lib.win32-3.2\lxml
copying src\lxml\_elementpath.py -> build\lib.win32-3.2\lxml
copying src\lxml\__init__.py -> build\lib.win32-3.2\lxml
creating build\lib.win32-3.2\lxml\html
copying src\lxml\html\builder.py -> build\lib.win32-3.2\lxml\html
copying src\lxml\html\clean.py -> build\lib.win32-3.2\lxml\html
copying src\lxml\html\defs.py -> build\lib.win32-3.2\lxml\html
copying src\lxml\html\diff.py -> build\lib.win32-3.2\lxml\html
copying src\lxml\html\ElementSoup.py -> build\lib.win32-3.2\lxml\html
copying src\lxml\html\formfill.py -> build\lib.win32-3.2\lxml\html
copying src\lxml\html\html5parser.py -> build\lib.win32-3.2\lxml\html
copying src\lxml\html\soupparser.py -> build\lib.win32-3.2\lxml\html
copying src\lxml\html\usedoctest.py -> build\lib.win32-3.2\lxml\html
copying src\lxml\html\_dictmixin.py -> build\lib.win32-3.2\lxml\html
copying src\lxml\html\_diffcommand.py -> build\lib.win32-3.2\lxml\html
copying src\lxml\html\_html5builder.py -> build\lib.win32-3.2\lxml\html
copying src\lxml\html\_setmixin.py -> build\lib.win32-3.2\lxml\html
copying src\lxml\html\__init__.py -> build\lib.win32-3.2\lxml\html
creating build\lib.win32-3.2\lxml\isoschematron
copying src\lxml\isoschematron\__init__.py -> build\lib.win32-3.2\lxml\isoschema
tron
copying src\lxml\etreepublic.pxd -> build\lib.win32-3.2\lxml
copying src\lxml\tree.pxd -> build\lib.win32-3.2\lxml
copying src\lxml\etree_defs.h -> build\lib.win32-3.2\lxml
creating build\lib.win32-3.2\lxml\isoschematron\resources
creating build\lib.win32-3.2\lxml\isoschematron\resources\rng
copying src\lxml\isoschematron\resources\rng\iso-schematron.rng -> build\lib.win
32-3.2\lxml\isoschematron\resources\rng
creating build\lib.win32-3.2\lxml\isoschematron\resources\xsl
copying src\lxml\isoschematron\resources\xsl\RNG2Schtrn.xsl -> build\lib.win32-3
.2\lxml\isoschematron\resources\xsl
copying src\lxml\isoschematron\resources\xsl\XSD2Schtrn.xsl -> build\lib.win32-3
.2\lxml\isoschematron\resources\xsl
creating build\lib.win32-3.2\lxml\isoschematron\resources\xsl\iso-schematron-xsl
t1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_abstract_e
xpand.xsl -> build\lib.win32-3.2\lxml\isoschematron\resources\xsl\iso-schematron
-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_dsdl_inclu
de.xsl -> build\lib.win32-3.2\lxml\isoschematron\resources\xsl\iso-schematron-xs
lt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron
_message.xsl -> build\lib.win32-3.2\lxml\isoschematron\resources\xsl\iso-schemat
ron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron
_skeleton_for_xslt1.xsl -> build\lib.win32-3.2\lxml\isoschematron\resources\xsl\
iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_svrl_for_x
slt1.xsl -> build\lib.win32-3.2\lxml\isoschematron\resources\xsl\iso-schematron-
xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\readme.txt ->
build\lib.win32-3.2\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
running build_ext
building 'lxml.etree' extension
creating build\temp.win32-3.2
creating build\temp.win32-3.2\Release
creating build\temp.win32-3.2\Release\src
creating build\temp.win32-3.2\Release\src\lxml
C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\Python32\include -IC:\Pytho
n32\PC -c src/lxml/lxml.etree.c -o build\temp.win32-3.2\Release\src\lxml\lxml.et
ree.o -w
cc1.exe: error: unrecognized command line option '-mno-cygwin'
error: command 'gcc' failed with exit status 1
----------------------------------------
Command C:\Python32\python.exe -c "import setuptools;__file__='C:\\Python32\\Scr
ipts\\build\\lxml\\setup.py';exec(compile(open(__file__).read().replace('\r\n',
'\n'), __file__, 'exec'))" install --single-version-externally-managed --record
c:\windows\temp\pip-w4t58y-record\install-record.txt failed with error code 1
Storing complete log in C:\Users\x\AppData\Roaming\pip\pip.log
The same thing happens with easy_install, but it doesn't happen when I install a package like 'bible'.
It is a known issue with distutils: mingw & -mno-cygwin with recent gcc.
See related SO question: Compiling with cython and mingw produces gcc: error: unrecognized command line option '-mno-cygwin'.
Try to remove -mno-cygwin from Mingw32CCompiler.