Cannot Install Pip with version 1.5 - python

Cannot install pil
tried using
$ sudo pip install pil
Downloading/unpacking pil
Could not find any downloads that satisfy the requirement pil
Some externally hosted files were ignored (use --allow-external pil to allow).
Cleaning up...
No distributions at all found for pil
Because of version 1.5, and increased security, I tired:
sudo pip install PIL --allow-external PIL --allow-unverified PIL
And I get this message afterwards, I have command line tools installed for Xcode, however, I had to install it directly from the terminal to do so. In any case I'm not quite sure what is going on.
$sudo pip install pil --allow-external pil --allow-unverified pil
Downloading/unpacking pil
pil is potentially insecure and unverifiable.
Downloading PIL-1.1.7.tar.gz (506kB): 506kB downloaded
Running setup.py (path:/private/tmp/pip_build_root/pil/setup.py) egg_info for package pil
WARNING: '' not a valid package name; please use only.-separated package names in setup.py
Installing collected packages: pil
Running setup.py install for pil
WARNING: '' not a valid package name; please use only.-separated package names in setup.py
--- using frameworks at /System/Library/Frameworks
building '_imaging' extension
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -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 -DHAVE_LIBZ -I/System/Library/Frameworks/Tcl.framework/Headers -I/System/Library/Frameworks/Tk.framework/Headers -IlibImaging -I/System/Library/Frameworks/Python.framework/Versions/2.7/include -I/usr/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _imaging.c -o build/temp.macosx-10.9-intel-2.7/_imaging.o
clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
error: command 'cc' failed with exit status 1
Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/tmp/pip_build_root/pil/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-O3PLEG-record/install-record.txt --single-version-externally-managed --compile:
WARNING: '' not a valid package name; please use only.-separated package names in setup.py
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-intel-2.7
copying PIL/__init__.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/ArgImagePlugin.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/BdfFontFile.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/BmpImagePlugin.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/BufrStubImagePlugin.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/ContainerIO.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/CurImagePlugin.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/DcxImagePlugin.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/EpsImagePlugin.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/ExifTags.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/FitsStubImagePlugin.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/FliImagePlugin.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/FontFile.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/FpxImagePlugin.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/GbrImagePlugin.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/GdImageFile.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/GifImagePlugin.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/GimpGradientFile.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/GimpPaletteFile.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/GribStubImagePlugin.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/Hdf5StubImagePlugin.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/IcnsImagePlugin.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/IcoImagePlugin.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/Image.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/ImageChops.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/ImageCms.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/ImageColor.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/ImageDraw.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/ImageDraw2.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/ImageEnhance.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/ImageFile.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/ImageFileIO.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/ImageFilter.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/ImageFont.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/ImageGL.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/ImageGrab.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/ImageMath.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/ImageMode.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/ImageOps.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/ImagePalette.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/ImagePath.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/ImageQt.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/ImageSequence.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/ImageShow.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/ImageStat.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/ImageTk.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/ImageTransform.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/ImageWin.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/ImImagePlugin.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/ImtImagePlugin.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/IptcImagePlugin.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/JpegImagePlugin.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/McIdasImagePlugin.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/MicImagePlugin.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/MpegImagePlugin.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/MspImagePlugin.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/OleFileIO.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/PaletteFile.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/PalmImagePlugin.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/PcdImagePlugin.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/PcfFontFile.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/PcxImagePlugin.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/PdfImagePlugin.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/PixarImagePlugin.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/PngImagePlugin.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/PpmImagePlugin.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/PsdImagePlugin.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/PSDraw.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/SgiImagePlugin.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/SpiderImagePlugin.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/SunImagePlugin.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/TarIO.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/TgaImagePlugin.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/TiffImagePlugin.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/TiffTags.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/WalImageFile.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/WmfImagePlugin.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/XbmImagePlugin.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/XpmImagePlugin.py -> build/lib.macosx-10.9-intel-2.7
copying PIL/XVThumbImagePlugin.py -> build/lib.macosx-10.9-intel-2.7
running build_ext
--- using frameworks at /System/Library/Frameworks
building '_imaging' extension
creating build/temp.macosx-10.9-intel-2.7
creating build/temp.macosx-10.9-intel-2.7/libImaging
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -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 -DHAVE_LIBZ -I/System/Library/Frameworks/Tcl.framework/Headers -I/System/Library/Frameworks/Tk.framework/Headers -IlibImaging -I/System/Library/Frameworks/Python.framework/Versions/2.7/include -I/usr/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _imaging.c -o build/temp.macosx-10.9-intel-2.7/_imaging.o
clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
error: command 'cc' failed with exit status 1
----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/tmp/pip_build_root/pil/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-O3PLEG-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/tmp/pip_build_root/pil
Storing debug log for failure in /Users/sethmcfall/Library/Logs/pip.log
Any ideas?

Related

Python Social Auth Django installation failure

I am trying to install Python Social Auth for Django, but it is not succesful.
Server OS: Ubuntu 14.04.5 LTS (GNU/Linux 2.6.32-042stab141.3 x86_64)
Python version: 3.4.3
Django version (if it matters): 2.0.8
I use pip install social-auth-app-django, and the installation is starting, but after a while I get some errors.
...
Building wheels for collected packages: cffi
Building wheel for cffi (setup.py) ... error
ERROR: Complete output from command /home/ks/priroda-venv/bin/python3.4 -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-7c3p58ht/cffi/setup. py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replac e('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec '"'"'))' bdist_wheel -d /tmp/pip-wheel-an_3ux86 --python-tag cp34:
ERROR: running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.4
creating build/lib.linux-x86_64-3.4/cffi
copying cffi/recompiler.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/setuptools_ext.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/commontypes.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/vengine_cpy.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/api.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/vengine_gen.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/model.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/error.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/ffiplatform.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/verifier.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/pkgconfig.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/cffi_opcode.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/lock.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/backend_ctypes.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/__init__.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/cparser.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/_cffi_include.h -> build/lib.linux-x86_64-3.4/cffi
copying cffi/parse_c_type.h -> build/lib.linux-x86_64-3.4/cffi
copying cffi/_embedding.h -> build/lib.linux-x86_64-3.4/cffi
copying cffi/_cffi_errors.h -> build/lib.linux-x86_64-3.4/cffi
running build_ext
building '_cffi_backend' extension
creating build/temp.linux-x86_64-3.4
creating build/temp.linux-x86_64-3.4/c
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototype s -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-securit y -D_FORTIFY_SOURCE=2 -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include /ffi -I/usr/include/libffi -I/usr/include/python3.4m -I/home/ks/priroda-venv/inc lude/python3.4m -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.4/c/_cffi_back end.o
c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
#include <ffi.h>
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for cffi
Running setup.py clean for cffi
Failed to build cffi
Installing collected packages: cffi, cryptography, social-auth-core, social-auth -app-django
Running setup.py install for cffi ... error
ERROR: Complete output from command /home/ks/priroda-venv/bin/python3.4 -u - c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-7c3p58ht/cffi/setu p.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().repl ace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'ex ec'"'"'))' install --record /tmp/pip-record-x424l4as/install-record.txt --single -version-externally-managed --compile --install-headers /home/ks/priroda-venv/in clude/site/python3.4/cffi:
ERROR: 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/cffi
copying cffi/recompiler.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/setuptools_ext.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/commontypes.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/vengine_cpy.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/api.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/vengine_gen.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/model.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/error.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/ffiplatform.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/verifier.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/pkgconfig.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/cffi_opcode.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/lock.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/backend_ctypes.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/__init__.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/cparser.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/_cffi_include.h -> build/lib.linux-x86_64-3.4/cffi
copying cffi/parse_c_type.h -> build/lib.linux-x86_64-3.4/cffi
copying cffi/_embedding.h -> build/lib.linux-x86_64-3.4/cffi
copying cffi/_cffi_errors.h -> build/lib.linux-x86_64-3.4/cffi
running build_ext
building '_cffi_backend' extension
creating build/temp.linux-x86_64-3.4
creating build/temp.linux-x86_64-3.4/c
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototy pes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-secur ity -D_FORTIFY_SOURCE=2 -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/inclu de/ffi -I/usr/include/libffi -I/usr/include/python3.4m -I/home/ks/priroda-venv/i nclude/python3.4m -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.4/c/_cffi_ba ckend.o
c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
#include <ffi.h>
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command "/home/ks/priroda-venv/bin/python3.4 -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-7c3p58ht/cffi/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-x424l4as/install-record.txt --single-version-externally-managed --compile --install-headers /home/ks/priroda-venv/include/site/python3.4/cffi" failed with error code 1 in /tmp/pip-install-7c3p58ht/cffi/
What could be done about this?
You are missing ffi headers which are contained in libffi-dev
sudo apt-get install libffi-dev

"Failed building wheel for psutil" when installing Transcrypt for Python

I am trying to install transcrypt into a python virtual environment using pip. Here's what happens:
username#host:~/Pycryptor$ source env/bin/activate
(env) username#host:~/Pycryptor$ pip install transcrypt
Collecting transcrypt
Collecting mypy (from transcrypt)
Using cached mypy-0.560-py3-none-any.whl
Requirement already satisfied: typed-ast<1.2.0,>=1.1.0 in ./env/lib/python3.6/site-packages (from mypy->transcrypt)
Collecting psutil<5.5.0,>=5.4.0 (from mypy->transcrypt)
Using cached psutil-5.4.3.tar.gz
Building wheels for collected packages: psutil
Running setup.py bdist_wheel for psutil ... error
Complete output from command /home/username/Pycryptor/env/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-izw5bnzb/psutil/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/tmpzqu0yyxlpip-wheel- --python-tag cp36:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-i686-3.6
creating build/lib.linux-i686-3.6/psutil
copying psutil/__init__.py -> build/lib.linux-i686-3.6/psutil
copying psutil/_psposix.py -> build/lib.linux-i686-3.6/psutil
copying psutil/_psosx.py -> build/lib.linux-i686-3.6/psutil
copying psutil/_pssunos.py -> build/lib.linux-i686-3.6/psutil
copying psutil/_psbsd.py -> build/lib.linux-i686-3.6/psutil
copying psutil/_common.py -> build/lib.linux-i686-3.6/psutil
copying psutil/_compat.py -> build/lib.linux-i686-3.6/psutil
copying psutil/_psaix.py -> build/lib.linux-i686-3.6/psutil
copying psutil/_pswindows.py -> build/lib.linux-i686-3.6/psutil
copying psutil/_exceptions.py -> build/lib.linux-i686-3.6/psutil
copying psutil/_pslinux.py -> build/lib.linux-i686-3.6/psutil
creating build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/__init__.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_windows.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/__main__.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_connections.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_bsd.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_posix.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_unicode.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_osx.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_contracts.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_memory_leaks.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_misc.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_aix.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_sunos.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_linux.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_process.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_system.py -> build/lib.linux-i686-3.6/psutil/tests
running build_ext
building 'psutil._psutil_linux' extension
creating build/temp.linux-i686-3.6
creating build/temp.linux-i686-3.6/psutil
i686-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.6-XcUuhr/python3.6-3.6.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=543 -DPSUTIL_LINUX=1 -I/usr/include/python3.6m -I/home/username/Pycryptor/env/include/python3.6m -c psutil/_psutil_common.c -o build/temp.linux-i686-3.6/psutil/_psutil_common.o
psutil/_psutil_common.c:9:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
error: command 'i686-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Failed building wheel for psutil
Running setup.py clean for psutil
Failed to build psutil
Installing collected packages: psutil, mypy, transcrypt
Running setup.py install for psutil ... error
Complete output from command /home/username/Pycryptor/env/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-izw5bnzb/psutil/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-q1g8wrzk-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/username/Pycryptor/env/include/site/python3.6/psutil:
running install
running build
running build_py
creating build
creating build/lib.linux-i686-3.6
creating build/lib.linux-i686-3.6/psutil
copying psutil/__init__.py -> build/lib.linux-i686-3.6/psutil
copying psutil/_psposix.py -> build/lib.linux-i686-3.6/psutil
copying psutil/_psosx.py -> build/lib.linux-i686-3.6/psutil
copying psutil/_pssunos.py -> build/lib.linux-i686-3.6/psutil
copying psutil/_psbsd.py -> build/lib.linux-i686-3.6/psutil
copying psutil/_common.py -> build/lib.linux-i686-3.6/psutil
copying psutil/_compat.py -> build/lib.linux-i686-3.6/psutil
copying psutil/_psaix.py -> build/lib.linux-i686-3.6/psutil
copying psutil/_pswindows.py -> build/lib.linux-i686-3.6/psutil
copying psutil/_exceptions.py -> build/lib.linux-i686-3.6/psutil
copying psutil/_pslinux.py -> build/lib.linux-i686-3.6/psutil
creating build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/__init__.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_windows.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/__main__.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_connections.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_bsd.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_posix.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_unicode.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_osx.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_contracts.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_memory_leaks.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_misc.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_aix.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_sunos.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_linux.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_process.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_system.py -> build/lib.linux-i686-3.6/psutil/tests
running build_ext
building 'psutil._psutil_linux' extension
creating build/temp.linux-i686-3.6
creating build/temp.linux-i686-3.6/psutil
i686-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.6-XcUuhr/python3.6-3.6.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=543 -DPSUTIL_LINUX=1 -I/usr/include/python3.6m -I/home/username/Pycryptor/env/include/python3.6m -c psutil/_psutil_common.c -o build/temp.linux-i686-3.6/psutil/_psutil_common.o
psutil/_psutil_common.c:9:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
error: command 'i686-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/home/username/Pycryptor/env/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-izw5bnzb/psutil/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-q1g8wrzk-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/username/Pycryptor/env/include/site/python3.6/psutil" failed with error code 1 in /tmp/pip-build-izw5bnzb/psutil/
(env) username#host:~/Pycryptor$
Same result when I use pip3.
I have python 3.5 and 3.6 installed. python3-dev version is 3.5.3-1. Python.h is located in /usr/include/python3.5m/Python.h. GCC is already the newest version (4:6.3.0-2ubuntu1).
What could be causing this error:
error: command 'i686-linux-gnu-gcc' failed with exit status 1 ?

Ubuntu server 16.04 failed building wheel for psycopg2

I'm setting up my new server (ubuntu 16.04.01) and i need to setup my sistem with postgres (9.3)+virtualenv+python+django(1.6)+nginx ecc..
I have already set-up the same sistem, 2 years ago, on ubuntu 14.04 with no problem, but now on new lts, i cant'install psycopg2.
When from virtualenv i try to execute pip install psycopg2 i receve this error message:
(gips) gips#gips-locale:~/gips/virtualenv/gestogips$ pip install psycopg2
Collecting psycopg2
Using cached psycopg2-2.6.2.tar.gz
Building wheels for collected packages: psycopg2
Running setup.py bdist_wheel for psycopg2 ... error
Complete output from command /home/gips/gips/virtualenv/gips/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-PF24T2/psycopg2/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmp9wlqN9pip-wheel- --python-tag cp27:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/psycopg2
copying lib/__init__.py -> build/lib.linux-x86_64-2.7/psycopg2
copying lib/pool.py -> build/lib.linux-x86_64-2.7/psycopg2
copying lib/errorcodes.py -> build/lib.linux-x86_64-2.7/psycopg2
copying lib/extensions.py -> build/lib.linux-x86_64-2.7/psycopg2
copying lib/_range.py -> build/lib.linux-x86_64-2.7/psycopg2
copying lib/psycopg1.py -> build/lib.linux-x86_64-2.7/psycopg2
copying lib/tz.py -> build/lib.linux-x86_64-2.7/psycopg2
copying lib/_json.py -> build/lib.linux-x86_64-2.7/psycopg2
copying lib/extras.py -> build/lib.linux-x86_64-2.7/psycopg2
creating build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/testutils.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_lobject.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_types_basic.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_copy.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/__init__.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_transaction.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_bug_gc.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_connection.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_green.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_bugX000.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_module.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_dates.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/testconfig.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_with.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_types_extras.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_cursor.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_cancel.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_psycopg2_dbapi20.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/dbapi20_tpc.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/dbapi20.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_errcodes.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_extras_dictcursor.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_async.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_quote.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_notify.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
running build_ext
building 'psycopg2._psycopg' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/psycopg
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time
-D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1
-DPSYCOPG_VERSION="2.6.2 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x09030E -DHAVE_LO64=1 -I/usr/include/python2.7 -I.
-I/usr/include/postgresql -I/usr/include/postgresql/9.3/server -c psycopg/psycopgmodule.c
-o build/temp.linux-x86_64-2.7/psycopg/psycopgmodule.o -Wdeclaration-after-statement
unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Failed building wheel for psycopg2
Running setup.py clean for psycopg2
Failed to build psycopg2
Installing collected packages: psycopg2
Running setup.py install for psycopg2 ... error
Complete output from command /home/gips/gips/virtualenv/gips/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-PF24T2/psycopg2/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-ORPyfs-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/gips/gips/virtualenv/gips/include/site/python2.7/psycopg2:
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/psycopg2
copying lib/__init__.py -> build/lib.linux-x86_64-2.7/psycopg2
copying lib/pool.py -> build/lib.linux-x86_64-2.7/psycopg2
copying lib/errorcodes.py -> build/lib.linux-x86_64-2.7/psycopg2
copying lib/extensions.py -> build/lib.linux-x86_64-2.7/psycopg2
copying lib/_range.py -> build/lib.linux-x86_64-2.7/psycopg2
copying lib/psycopg1.py -> build/lib.linux-x86_64-2.7/psycopg2
copying lib/tz.py -> build/lib.linux-x86_64-2.7/psycopg2
copying lib/_json.py -> build/lib.linux-x86_64-2.7/psycopg2
copying lib/extras.py -> build/lib.linux-x86_64-2.7/psycopg2
creating build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/testutils.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_lobject.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_types_basic.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_copy.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/__init__.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_transaction.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_bug_gc.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_connection.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_green.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_bugX000.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_module.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_dates.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/testconfig.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_with.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_types_extras.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_cursor.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_cancel.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_psycopg2_dbapi20.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/dbapi20_tpc.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/dbapi20.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_errcodes.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_extras_dictcursor.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_async.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_quote.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_notify.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
running build_ext
building 'psycopg2._psycopg' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/psycopg
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time
-D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1
-DPSYCOPG_VERSION="2.6.2 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x09030E -DHAVE_LO64=1 -I/usr/include/python2.7 -I.
-I/usr/include/postgresql -I/usr/include/postgresql/9.3/server -c psycopg/psycopgmodule.c
-o build/temp.linux-x86_64-2.7/psycopg/psycopgmodule.o -Wdeclaration-after-statement
unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/home/gips/gips/virtualenv/gips/bin/python2 -u -c "import setuptools,
tokenize;__file__='/tmp/pip-build-PF24T2/psycopg2/setup.py';
exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))"
install --record /tmp/pip-ORPyfs-record/install-record.txt --single-version-externally-managed --compile
--install-headers /home/gips/gips/virtualenv/gips/include/site/python2.7/psycopg2"
failed with error code 1 in /tmp/pip-build-PF24T2/psycopg2/
any ideas? i have read a couple of similar post that suggest to run
sudo apt-get install libpq-dev python-dev
but i have done it with no results..still have same error

Install lxml on Centos 7 - error: command 'gcc' failed with exit status 4

I'm using python 3.4 in a virtual environment:
(af)[root#domain backend]# pip --version
pip 7.1.0 from /home/af/af-stage/backend/.ves/af/lib/python3.4/site-packages (python 3.4)
Installation of lxml failed "error: command 'gcc' failed with exit status 4":
(af)[root#domain backend]# pip install lxml
You are using pip version 7.1.0, however version 7.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting lxml
Using cached lxml-3.5.0.tar.gz
Building wheels for collected packages: lxml
Running setup.py bdist_wheel for lxml
Complete output from command /home/af/af-stage/backend/.ves/af/bin/python3.4 -c "import setuptools;__file__='/tmp/pip-build-tlogtyk2/lxml/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmpod9hcw0ypip-wheel-:
Building lxml version 3.5.0.
Building without Cython.
Using build configuration of libxslt 1.1.28
Building against libxml2/libxslt in the following directory: /usr/lib64
running bdist_wheel
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/usedoctest.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/builder.py -> build/lib.linux-x86_64-3.4/lxml
copying src/lxml/sax.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/_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/ElementInclude.py -> build/lib.linux-x86_64-3.4/lxml
copying src/lxml/pyclasslookup.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/usedoctest.py -> 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/__init__.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
copying src/lxml/html/builder.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/_diffcommand.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/formfill.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/diff.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/clean.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/etreepublic.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/xmlschema.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/xmlerror.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/tree.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/relaxng.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/xinclude.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/dtdvalid.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
copying src/lxml/includes/c14n.pxd -> 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
copying src/lxml/includes/etree_defs.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_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_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_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 -Wno-unused-result -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/libxml2 -Isrc/lxml/includes -I/usr/include/python3.4m -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-3.4/src/lxml/lxml.etree.o -w
{standard input}: Assembler messages:
{standard input}:1531298: Error: unknown pseudo-op: `.uleb'
gcc: internal compiler error: Killed (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
Compile failed: command 'gcc' failed with exit status 4
creating tmp
cc -I/usr/include/libxml2 -I/usr/include/libxml2 -c /tmp/xmlXPathInitpm92p5c8.c -o tmp/xmlXPathInitpm92p5c8.o
cc tmp/xmlXPathInitpm92p5c8.o -L/usr/lib64 -lxml2 -o a.out
error: command '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/af/af-stage/backend/.ves/af/bin/python3.4 -c "import setuptools, tokenize;__file__='/tmp/pip-build-tlogtyk2/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-99hwjy1o-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/af/af-stage/backend/.ves/af/include/site/python3.4/lxml:
Building lxml version 3.5.0.
Building without Cython.
Using build configuration of libxslt 1.1.28
Building against libxml2/libxslt in the following directory: /usr/lib64
running install
running build
running build_py
copying src/lxml/includes/lxml-version.h -> build/lib.linux-x86_64-3.4/lxml/includes
running build_ext
building 'lxml.etree' extension
gcc -pthread -Wno-unused-result -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/libxml2 -Isrc/lxml/includes -I/usr/include/python3.4m -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-3.4/src/lxml/lxml.etree.o -w
{standard input}: Assembler messages:
{standard input}:1320351: Error: unknown pseudo-op: `.uleb1'
gcc: internal compiler error: Killed (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
Compile failed: command 'gcc' failed with exit status 4
cc -I/usr/include/libxml2 -I/usr/include/libxml2 -c /tmp/xmlXPathInit3tj66iu0.c -o tmp/xmlXPathInit3tj66iu0.o
cc tmp/xmlXPathInit3tj66iu0.o -L/usr/lib64 -lxml2 -o a.out
error: command 'gcc' failed with exit status 4
----------------------------------------
Command "/home/af/af-stage/backend/.ves/af/bin/python3.4 -c "import setuptools, tokenize;__file__='/tmp/pip-build-tlogtyk2/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-99hwjy1o-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/af/af-stage/backend/.ves/af/include/site/python3.4/lxml" failed with error code 1 in /tmp/pip-build-tlogtyk2/lxml
Notes:
I've already done yum install libxslt-devel libxml2-devel
You just need to use yum install python-lxml.
Of course, lxml module depend on libxml2 libxslt libxml2-devel libxslt-devel.
This worked for me: yum install -y libxml2 libxml2-devel libxslt libxslt-devel
It works after installing:
libxml++-2.30.0-1.el6.i686
libsigc++20-devel-2.2.4.2-1.el6.i686
libxml2-static-2.7.6-21.el6_8.1.i686
libxml++-devel-2.30.0-1.el6.i686
libxslt-python-1.1.26-2.el6_3.1.i686
gccxml-0.9.0-0.27.20150423.git3afa8ba.el6.i686
I updated my lxml version from 3.7.0 to the latest one 4.1.1 and that works for me.

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