When I try to pip install pillow, I get an error: ‘JPEG_LIB_VERSION’ undeclared #9

Closed
natea opened this Issue Aug 29, 2012 · 7 comments

Comments

Projects
None yet
3 participants

natea commented Aug 29, 2012

gcc -pthread -fno-strict-aliasing -fPIC -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBJPEG -DHAVE_LIBZ -I/usr/include/freetype2 -IlibImaging -I/opt/ActivePython-2.7/include -I/usr/include/tcl8.5 -I/usr/local/include -I/usr/include -I/opt/ActivePython-2.7/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/JpegDecode.c -o build/temp.linux-x86_64-2.7/libImaging/JpegDecode.o

libImaging/JpegDecode.c: In function ‘ImagingJpegDecode’:

libImaging/JpegDecode.c:136:2: error: ‘JPEG_LIB_VERSION’ undeclared (first use in this function)

libImaging/JpegDecode.c:136:2: note: each undeclared identifier is reported only once for each function it appears in

error: command 'gcc' failed with exit status 1


Command /opt/ActivePython-2.7/bin/python -c "import setuptools;file='/app/build/pillow/setup.py';exec(compile(open(file).read().replace('\r\n', '\n'), file, 'exec'))" install --single-version-externally-managed --record /tmp/pip-AcU1C_-record/install-record.txt failed with error code 1 in /app/build/pillow
Storing complete log in /app/.pip/pip.log

All the pillow dependencies are install using apt-get:

$ sudo apt-get install libjpeg-dev libfreetype6-dev zlib1g-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libjpeg-dev is already the newest version.
zlib1g-dev is already the newest version.
libfreetype6-dev is already the newest version.
libfreetype6-dev set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Owner

aclark4life commented Aug 29, 2012

What OS?

Owner

aclark4life commented Sep 8, 2012

Works for me:


aclark@aclark:~/Developer/venv/ > bin/pip install Pillow
Downloading/unpacking Pillow
  Downloading Pillow-1.7.7.zip (725Kb): 725Kb downloaded
  Running setup.py egg_info for package Pillow

    warning: no previously-included files found matching '.hgignore'
    warning: no previously-included files found matching '.hgtags'
    warning: no previously-included files found matching 'BUILDME.bat'
    warning: no previously-included files found matching 'make-manifest.py'
    warning: no previously-included files found matching 'SHIP'
    warning: no previously-included files found matching 'SHIP.bat'
    warning: no previously-included files matching '*' found under directory 'Tests'
Installing collected packages: Pillow
  Running setup.py install for Pillow
    building '_imaging' extension
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBZ -IlibImaging -I/home/aclark/Developer/venv/include -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c _imaging.c -o build/temp.linux-x86_64-2.7/_imaging.o
    _imaging.c:3017:5: warning: initialization from incompatible pointer type [enabled by default]
    _imaging.c:3017:5: warning: (near initialization for ‘image_as_sequence.sq_length’) [enabled by default]
    _imaging.c:3077:5: warning: initialization from incompatible pointer type [enabled by default]
    _imaging.c:3077:5: warning: (near initialization for ‘pixel_access_as_mapping.mp_length’) [enabled by default]
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBZ -IlibImaging -I/home/aclark/Developer/venv/include -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c decode.c -o build/temp.linux-x86_64-2.7/decode.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBZ -IlibImaging -I/home/aclark/Developer/venv/include -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c encode.c -o build/temp.linux-x86_64-2.7/encode.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBZ -IlibImaging -I/home/aclark/Developer/venv/include 
-I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c display.c -o build/temp.linux-x86_64-2.7/display.o    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBZ -IlibImaging -I/home/aclark/Developer/venv/include -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c outline.c -o build/temp.linux-x86_64-2.7/outline.o 
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBZ -IlibImaging -I/home/aclark/Developer/venv/include 
-I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/JpegEncode.c -o build/temp.linux-x86_64-2.7/libIma
ging/JpegEncode.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBZ -IlibImaging -I/home/aclark/Developer/venv/include -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/LzwDecode.c -o build/temp.linux-x86_64-2.7/libImag
ing/LzwDecode.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBZ -IlibImaging -I/home/aclark/Developer/venv/include -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/Matrix.c -o build/temp.linux-x86_64-2.7/libImaging
/Matrix.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBZ -IlibImaging -I/home/aclark/Developer/venv/include -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/ModeFilter.c -o build/temp.linux-x86_64-2.7/libIma
ging/ModeFilter.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBZ -IlibImaging -I/home/aclark/Developer/venv/include -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/MspDecode.c -o build/temp.linux-x86_64-2.7/libImag
ing/MspDecode.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBZ -IlibImaging -I/home/aclark/Developer/venv/include -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/Negative.c -o build/temp.linux-x86_64-2.7/libImagi
ng/Negative.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBZ -IlibImaging -I/home/aclark/Developer/venv/include -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/Offset.c -o build/temp.linux-x86_64-2.7/libImaging
/Offset.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBZ -IlibImaging -I/home/aclark/Developer/venv/include -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/Pack.c -o build/temp.linux-x86_64-2.7/libImaging/P
ack.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBZ -IlibImaging -I/home/aclark/Developer/venv/include -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/PackDecode.c -o build/temp.linux-x86_64-2.7/libIma
ging/PackDecode.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBZ -IlibImaging -I/home/aclark/Developer/venv/include -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/Palette.c -o build/temp.linux-x86_64-2.7/libImagin
g/Palette.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBZ -IlibImaging -I/home/aclark/Developer/venv/include 
-I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/Paste.c -o build/temp.linux-x86_64-2.7/libImaging/Paste.o    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBZ -IlibImaging -I/home/aclark/Developer/venv/include -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/Quant.c -o build/temp.linux-x86_64-2.7/libImaging/Quant.o 
    libImaging/Quant.c: In function ‘rehash_collide’:
    libImaging/Quant.c:154:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBZ -IlibImaging -I/home/aclark/Developer/venv/include -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/RawDecode.c -o build/temp.linux-x86_64-2.7/libImag
ing/RawDecode.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBZ -IlibImaging -I/home/aclark/Developer/venv/include -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/RawEncode.c -o build/temp.linux-x86_64-2.7/libImag
ing/RawEncode.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBZ -IlibImaging -I/home/aclark/Developer/venv/include -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/Storage.c -o build/temp.linux-x86_64-2.7/libImagin
g/Storage.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBZ -IlibImaging -I/home/aclark/Developer/venv/include -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/SunRleDecode.c -o build/temp.linux-x86_64-2.7/libI
maging/SunRleDecode.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBZ -IlibImaging -I/home/aclark/Developer/venv/include -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/TgaRleDecode.c -o build/temp.linux-x86_64-2.7/libI
maging/TgaRleDecode.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBZ -IlibImaging -I/home/aclark/Developer/venv/include -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/Unpack.c -o build/temp.linux-x86_64-2.7/libImaging
/Unpack.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBZ -IlibImaging -I/home/aclark/Developer/venv/include -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/UnpackYCC.c -o build/temp.linux-x86_64-2.7/libImag
ing/UnpackYCC.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBZ -IlibImaging -I/home/aclark/Developer/venv/include -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/UnsharpMask.c -o build/temp.linux-x86_64-2.7/libIm
aging/UnsharpMask.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBZ -IlibImaging -I/home/aclark/Developer/venv/include -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/XbmDecode.c -o build/temp.linux-x86_64-2.7/libImag
ing/XbmDecode.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBZ -IlibImaging -I/home/aclark/Developer/venv/include -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/XbmEncode.c -o build/temp.linux-x86_64-2.7/libImag
ing/XbmEncode.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBZ -IlibImaging -I/home/aclark/Developer/venv/include -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/ZipDecode.c -o build/temp.linux-x86_64-2.7/libImag
ing/ZipDecode.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBZ -IlibImaging -I/home/aclark/Developer/venv/include 
-I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/ZipEncode.c -o build/temp.linux-x86_64-2.7/libImaging/ZipEncode.o
    gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro build/temp.linux-x86_64-2.7/_imaging.o build/temp.linux-x86_64-2.7/decode.o build/temp.linux-x86_64-2.7/encode.o build/temp.linux-x86_64-2.7/map.o build/temp.linux-x86_64-2.7/display.o build/temp.linux-x86_64-2.7/outline.o build/temp.linux-x86_64-2.7/path.o build/temp.linux-x86_64-2.7/libImaging/Access.o build/temp.linux-x86_64-2.7/libImaging/Antialias.o build/temp.linux-x86_64-2.7/libImaging/Bands.o build/temp.linux-x86_64-2.7/libImaging/BitDecode.o build/temp.linux-x86_64-2.7/libImaging/Blend.o build/temp.linux-x86_64-2.7/libImaging/Chops.o build/temp.linux-x86_64-2.7/libImaging/Convert.o build/temp.linux-x86_64-2.7/libImaging/ConvertYCbCr.o build/temp.linux-x86_64-2.7/libImaging/Copy.o build/temp.linux-x86_64-2.7/libImaging/Crc32.o build/temp.linux-x86_64-2.7/libImaging/Crop.o build/temp.linux-x86_64-2.7/libImaging/Dib.o build/temp.linux-x86_64-2.7/libImaging/Draw.o build/temp.linux-x86_64-2.7/libImaging/Effects.o build/temp.linux-x86_64-2.7/libImaging/EpsEncode.o build/temp.linux-x86_64-2.7/libImaging/File.o build/temp.linux-x86_64-2.7/libImaging/Fill.o build/temp.linux-x86_64-2.7/libImaging/Filter.o build/temp.linux-x86_64-2.7/libImaging/FliDecode.o build/temp.linux-x86_64-2.7/libImaging/Geometry.o build/temp.linux-x86_64-2.7/libImaging/GetBBox.o build/temp.linux-x86_64-2.7/libImaging/GifDecode.o build/temp.linux-x86_64-2.7/libImaging/GifEncode.o build/temp.linux-x86_64-2.7/libImaging/HexDecode.o build/temp.linux-x86_64-2.7/libImaging/Histo.o build/temp.linux-x86_64-2.7/libImaging/JpegDecode.o build/temp.linux-x86_64-2.7/libImaging/JpegEncode.o build/temp.linux-x86_64-2.7/libImaging/LzwDecode.o build/temp.linux-x86_64-2.7/libImaging/Matrix.o build/temp.linux-x86_64-2.7/libImaging/ModeFilter.o build/temp.linux-x86_64-2.7/libImaging/MspDecode.o build/temp.linux-x86_64-2.7/libImaging/Negative.o build/temp.linux-x86_64-2.7/libImaging/Offset.o build/temp.linux-x86_64-2.7/libImaging/Pack.o build/temp.linux-x86_64-2.7/libImaging/PackDecode.o build/temp.linux-x86_64-2.7/libImaging/Palette.o build/temp.linux-x86_64-2.7/libImaging/Paste.o build/temp.linux-x86_64-2.7/libImaging/Quant.o build/temp.linux-x86_64-2.7/libImaging/QuantHash.o build/temp.linux-x86_64-2.7/libImaging/QuantHeap.o build/temp.linux-x86_64-2.7/libImaging/PcdDecode.o build/temp.linux-x86_64-2.7/libImaging/PcxDecode.o build/temp.linux-x86_64-2.7/libImaging/PcxEncode.o build/temp.linux-x86_64-2.7/libImaging/Point.o build/temp.linux-x86_64-2.7/libImaging/RankFilter.o build/temp.linux-x86_64-2.7/libImaging/RawDecode.o build/temp.linux-x86_64-2.7/libImaging/RawEncode.o build/temp.linux-x86_64-2.7/libImaging/Storage.o build/temp.linux-x86_64-2.7/libImaging/SunRleDecode.o build/temp.linux-x86_64-2.7/libImaging/TgaRleDecode.o build/temp.linux-x86_64-2.7/libImaging/Unpack.o build/temp.linux-x86_64-2.7/libImaging/UnpackYCC.o build/temp.linux-x86_64-2.7/libImaging/UnsharpMask.o build/temp.linux-x86_64-2.7/libImaging/XbmDecode.o build/temp.linux-x86_64-2.7/libImaging/XbmEncode.o build/temp.linux-x86_64-2.7/libImaging/ZipDecode.o build/temp.linux-x86_64-2.7/libImaging/ZipEncode.o -L/usr/lib/x86_64-linux-gnu -L/usr/local/lib -L/home/aclark/Developer/venv/lib -L/usr/lib/x86_64-linux-gnu -lz -o build/lib.linux-x86_64-2.7/_imaging.so
    building '_imagingmath' extension
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -IlibImaging -I/home/aclark/Developer/venv/include -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c _imagingmath.c -o build/temp.linux-x86_64-2.7/_imagingmath.o
    gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro build/temp.linux-x86_64-2.7/_imagingmath.o -L/usr/lib/x86_64-linux-gnu -L/usr/local/lib -L/home/aclark/Developer/venv/lib -L/usr/lib/x86_64-linux-gnu -o build/lib.linux-x86_64-2.7/_imagingmath.so
    --------------------------------------------------------------------
    version       1.7.7
    platform      linux2 2.7.3 (default, Aug  1 2012, 05:14:39)
                  [GCC 4.6.3]
    --------------------------------------------------------------------
    *** TKINTER support not available
    *** JPEG support not available
    --- ZLIB (PNG/ZIP) support available
    *** FREETYPE2 support not available
    *** LITTLECMS support not available
    --------------------------------------------------------------------
    To add a missing option, make sure you have the required
    library, and set the corresponding ROOT variable in the
    setup.py script.

    To check the build, run the selftest.py script.
    changing mode of build/scripts-2.7/pilconvert.py from 664 to 775
    changing mode of build/scripts-2.7/pildriver.py from 664 to 775
    changing mode of build/scripts-2.7/pilfile.py from 664 to 775
    changing mode of build/scripts-2.7/pilfont.py from 664 to 775
    changing mode of build/scripts-2.7/pilprint.py from 664 to 775

    warning: no previously-included files found matching '.hgignore'
    warning: no previously-included files found matching '.hgtags'
    warning: no previously-included files found matching 'BUILDME.bat'
    warning: no previously-included files found matching 'make-manifest.py'
    warning: no previously-included files found matching 'SHIP'
    warning: no previously-included files found matching 'SHIP.bat'
    warning: no previously-included files matching '*' found under directory 'Tests'
    changing mode of /home/aclark/Developer/venv/bin/pilconvert.py to 775
    changing mode of /home/aclark/Developer/venv/bin/pildriver.py to 775
    changing mode of /home/aclark/Developer/venv/bin/pilfile.py to 775
    changing mode of /home/aclark/Developer/venv/bin/pilfont.py to 775
    changing mode of /home/aclark/Developer/venv/bin/pilprint.py to 775
Successfully installed Pillow
Cleaning up...
aclark@aclark:~/Developer/venv/ > cat /etc/issue
Ubuntu 12.04.1 LTS \n \l

@aclark4life aclark4life closed this Sep 8, 2012

Owner

aclark4life commented Sep 8, 2012

Wait, I don't have libjpeg

@aclark4life aclark4life reopened this Sep 8, 2012

Owner

aclark4life commented Sep 8, 2012

OK, now works for me with libjpeg-dev and friends installed:


aclark@aclark:~/Developer/venv/ > sudo aptitude install libjpeg-dev
The following NEW packages will be installed:
  libjpeg-dev libjpeg-turbo8-dev{a} libjpeg8-dev{a} 
0 packages upgraded, 3 newly installed, 0 to remove and 9 not upgraded.
Need to get 394 kB of archives. After unpacking 1,220 kB will be used.
Do you want to continue? [Y/n/?] 
Get: 1 http://mirror.rackspace.com/ubuntu/ precise-updates/main libjpeg-turbo8-dev amd64 1.1.90+svn733-0ubuntu4.1 [391 kB]
Get: 2 http://mirror.rackspace.com/ubuntu/ precise/main libjpeg8-dev amd64 8c-2ubuntu7 [1,544 B]
Get: 3 http://mirror.rackspace.com/ubuntu/ precise/main libjpeg-dev all 8c-2ubuntu7 [1,536 B]
Fetched 394 kB in 0s (514 kB/s)    
Selecting previously unselected package libjpeg-turbo8-dev.
(Reading database ... 63625 files and directories currently installed.)
Unpacking libjpeg-turbo8-dev (from .../libjpeg-turbo8-dev_1.1.90+svn733-0ubuntu4.1_amd64.deb) ...
Selecting previously unselected package libjpeg8-dev.
Unpacking libjpeg8-dev (from .../libjpeg8-dev_8c-2ubuntu7_amd64.deb) ...
Selecting previously unselected package libjpeg-dev.
Unpacking libjpeg-dev (from .../libjpeg-dev_8c-2ubuntu7_all.deb) ...
Setting up libjpeg-turbo8-dev (1.1.90+svn733-0ubuntu4.1) ...
Setting up libjpeg8-dev (8c-2ubuntu7) ...
Setting up libjpeg-dev (8c-2ubuntu7) ...

aclark@aclark:~/Developer/venv/ > bin/pip install Pillow           
Downloading/unpacking Pillow
  Downloading Pillow-1.7.7.zip (725Kb): 725Kb downloaded
  Running setup.py egg_info for package Pillow

    warning: no previously-included files found matching '.hgignore'
    warning: no previously-included files found matching '.hgtags'
    warning: no previously-included files found matching 'BUILDME.bat'
    warning: no previously-included files found matching 'make-manifest.py'
    warning: no previously-included files found matching 'SHIP'
    warning: no previously-included files found matching 'SHIP.bat'
    warning: no previously-included files matching '*' found under directory 'Tests'
Installing collected packages: Pillow
  Running setup.py install for Pillow
    building '_imaging' extension
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBJPEG -DHAVE_LIBZ -IlibImaging -I/home/aclark/Developer/venv/include -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c _imaging.c -o build/temp.linux-x86_64-2.7/_imaging.o
    _imaging.c:3017:5: warning: initialization from incompatible pointer type [enabled by default]
    _imaging.c:3017:5: warning: (near initialization for ‘image_as_sequence.sq_length’) [enabled by default]
    _imaging.c:3077:5: warning: initialization from incompatible pointer type [enabled by default]
    _imaging.c:3077:5: warning: (near initialization for ‘pixel_access_as_mapping.mp_length’) [enabled by default]
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBJPEG -DHAVE_LIBZ -IlibImaging -I/home/aclark/Developer/venv/include -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c decode.c -o build/temp.linux-x86_64-2.7/decode.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBJPEG -DHAVE_LIBZ -IlibImaging -I/home/aclark/Developer/venv/include -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c encode.c -o build/temp.linux-x86_64-2.7/encode.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBJPEG -DHAVE_LIBZ -IlibImaging -I/home/aclark/Developer/venv/include -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c map.c -o build/temp.linux-x86_64-2.7/map.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBJPEG -DHAVE_LIBZ -IlibImaging -I/home/aclark/Developer/venv/include -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c display.c -o build/temp.linux-x86_64-2.7/display.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBJPEG -DHAVE_LIBZ -IlibImaging -I/home/aclark/Developer/venv/include -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c outline.c -o build/temp.linux-x86_64-2.7/outline.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBJPEG -DHAVE_LIBZ -IlibImaging -I/home/aclark/Develope
r/venv/include -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/JpegEncode.c -o build/temp.linux-x8
6_64-2.7/libImaging/JpegEncode.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBJPEG -DHAVE_LIBZ -IlibImaging -I/home/aclark/Developer/venv/include -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/LzwDecode.c -o build/temp.linux-x86
_64-2.7/libImaging/LzwDecode.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBJPEG -DHAVE_LIBZ -IlibImaging -I/home/aclark/Developer/venv/include -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/Matrix.c -o build/temp.linux-x86_64
-2.7/libImaging/Matrix.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBJPEG -DHAVE_LIBZ -IlibImaging -I/home/aclark/Developer/venv/include -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/ModeFilter.c -o build/temp.linux-x8
6_64-2.7/libImaging/ModeFilter.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBJPEG -DHAVE_LIBZ -IlibImaging -I/home/aclark/Developer/venv/include -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/MspDecode.c -o build/temp.linux-x86
_64-2.7/libImaging/MspDecode.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBJPEG -DHAVE_LIBZ -IlibImaging -I/home/aclark/Developer/venv/include -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/Negative.c -o build/temp.linux-x86_
64-2.7/libImaging/Negative.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBJPEG -DHAVE_LIBZ -IlibImaging -I/home/aclark/Developer/venv/include -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/Offset.c -o build/temp.linux-x86_64
-2.7/libImaging/Offset.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBJPEG -DHAVE_LIBZ -IlibImaging -I/home/aclark/Developer/venv/include -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/Pack.c -o build/temp.linux-x86_64-2
    --------------------------------------------------------------------
    version       1.7.7
    platform      linux2 2.7.3 (default, Aug  1 2012, 05:14:39)
                  [GCC 4.6.3]
    --------------------------------------------------------------------
    *** TKINTER support not available
    --- JPEG support available
    --- ZLIB (PNG/ZIP) support available
    *** FREETYPE2 support not available
    *** LITTLECMS support not available
    --------------------------------------------------------------------
    To add a missing option, make sure you have the required
    library, and set the corresponding ROOT variable in the
    setup.py script.

    To check the build, run the selftest.py script.
    changing mode of build/scripts-2.7/pilconvert.py from 664 to 775
    changing mode of build/scripts-2.7/pildriver.py from 664 to 775
    changing mode of build/scripts-2.7/pilfile.py from 664 to 775
    changing mode of build/scripts-2.7/pilfont.py from 664 to 775
    changing mode of build/scripts-2.7/pilprint.py from 664 to 775

    warning: no previously-included files found matching '.hgignore' 
    warning: no previously-included files found matching '.hgtags' 
    warning: no previously-included files found matching 'BUILDME.bat'
    warning: no previously-included files found matching 'make-manifest.py'
    warning: no previously-included files found matching 'SHIP'
    warning: no previously-included files found matching 'SHIP.bat' 
    warning: no previously-included files matching '*' found under directory 'Tests'
    changing mode of /home/aclark/Developer/venv/bin/pilconvert.py to 775
    changing mode of /home/aclark/Developer/venv/bin/pildriver.py to 775
    changing mode of /home/aclark/Developer/venv/bin/pilfile.py to 775
    changing mode of /home/aclark/Developer/venv/bin/pilfont.py to 775
    changing mode of /home/aclark/Developer/venv/bin/pilprint.py to 775
Successfully installed Pillow
Cleaning up...

@aclark4life aclark4life closed this Sep 8, 2012

yxlwfds commented Mar 11, 2013

my OS: ubuntu 12.10
pip install Pillow
Downloading/unpacking Pillow
Downloading Pillow-1.7.8.zip (410kB): 410kB downloaded
Running setup.py egg_info for package Pillow
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'use_2to3'
warnings.warn(msg)

warning: no previously-included files found matching '.hgignore'
warning: no previously-included files found matching '.hgtags'
warning: no previously-included files found matching 'BUILDME.bat'
warning: no previously-included files found matching 'make-manifest.py'
warning: no previously-included files found matching 'SHIP'
warning: no previously-included files found matching 'SHIP.bat'
warning: no previously-included files matching '*' found under directory 'Tests'

Installing collected packages: Pillow
Running setup.py install for Pillow
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'use_2to3'
warnings.warn(msg)
building '_imaging' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBJPEG -IlibImaging -I/home/yu/mezzanine/include -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c _imaging.c -o build/temp.linux-x86_64-2.7/_imaging.o
_imaging.c:75:20: 致命错误: Python.h:没有那个文件或目录
编译中断。
error: command 'gcc' failed with exit status 1
Complete output from command /home/yu/mezzanine/bin/python -c "import setuptools;file='/home/yu/mezzanine/build/Pillow/setup.py';exec(compile(open(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-1W7tdS-record/install-record.txt --single-version-externally-managed --install-headers /home/yu/mezzanine/include/site/python2.7:
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'use_2to3'

warnings.warn(msg)

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/PIL

copying PIL/ImageShow.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/ImageQt.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/GimpPaletteFile.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/ContainerIO.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/PsdImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/PixarImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/PcfFontFile.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/EpsImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/ImageDraw.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/TarIO.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/ImageFile.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/ImageGL.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/FontFile.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/SunImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/MspImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/IptcImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/MicImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/BufrStubImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/ImagePath.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/ImageEnhance.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/ImageChops.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/BmpImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/ImtImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/ExifTags.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/ImageOps.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/ImageStat.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/GimpGradientFile.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/McIdasImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/XVThumbImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/ImageCms.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/ImageColor.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/SgiImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/WmfImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/Image.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/TiffImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/PpmImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/ArgImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/ImageSequence.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/ImageFileIO.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/ImageMode.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/PSDraw.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/GribStubImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/ImageTk.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/ImageDraw2.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/XpmImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/TgaImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/ImageTransform.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/OleFileIO.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/init.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/MpegImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/DcxImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/GifImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/TiffTags.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/WalImageFile.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/JpegImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/ImageGrab.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/BdfFontFile.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/PaletteFile.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/ImageFont.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/PcdImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/PalmImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/IcoImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/GbrImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/CurImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/XbmImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/GdImageFile.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/IcnsImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/PngImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/FliImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/ImImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/FpxImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/ImagePalette.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/ImageFilter.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/ImageWin.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/Hdf5StubImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/PcxImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/SpiderImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/ImageMath.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/FitsStubImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL

copying PIL/PdfImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL

running build_ext

building '_imaging' extension

creating build/temp.linux-x86_64-2.7/libImaging

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBJPEG -IlibImaging -I/home/yu/mezzanine/include -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c _imaging.c -o build/temp.linux-x86_64-2.7/_imaging.o

_imaging.c:75:20: 致命错误: Python.h:没有那个文件或目录

编译中断。

error: command 'gcc' failed with exit status 1


Command /home/yu/mezzanine/bin/python -c "import setuptools;file='/home/yu/mezzanine/build/Pillow/setup.py';exec(compile(open(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-1W7tdS-record/install-record.txt --single-version-externally-managed --install-headers /home/yu/mezzanine/include/site/python2.7 failed with error code 1 in /home/yu/mezzanine/build/Pillow
Storing complete log in /tmp/tmpreZqo9
(mezzanine)yu@yu-virtual-machine:~/mezzanine/mezzanine$

yxlwfds commented Mar 11, 2013

i sloved it

sudo apt-get install python2.7-dev

hugovk added a commit that referenced this issue Sep 24, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment