when I try to install Pillow in my virtualenv, I get the following error:
>(django-project1) pk@pk-900X3C-900X3D-900X4C-900X4D :~/Work/django-project1$ pip install -U Pillow Downloading/unpacking Pillow Downloading Pillow-2.2.1.zip (2.2MB): 2.2MB downloaded Running setup.py egg_info for package Pillow >Installing collected packages: Pillow Running setup.py install for Pillow > building 'PIL._imaging' extension i686-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -DHAVE_LIBJPEG -DHAVE_LIBZ -I/usr/include/freetype2 -IlibImaging -I/usr/local/include -I/usr/include -I/usr/include/python3.3m -I/home/pk/Work/django-project1/include/python3.3m -c _imaging.c -o build/temp.linux-i686-3.3/_imaging.o _imaging.c:76:20: fatal error: Python.h: No such file or directory
What could be causing the problem? I also have problems installing PIL separately in virtualenv:
>(django-project1) pk@pk-900X3C-900X3D-900X4C-900X4D :~/Work/django-project1/shop$ pip install PIL >Downloading/unpacking PIL > You are installing a potentially insecure and unverifiable file. Future versions of pip >will default to disallowing insecure files. > Downloading PIL-1.1.7.tar.gz (506kB): 506kB downloaded > Running setup.py egg_info for package PIL > Traceback (most recent call last): > File "<string>", line 16, in <module> > File "/home/pk/Work/django-project1/build/PIL/setup.py", line 182 > print "--- using Tcl/Tk libraries at", TCL_ROOT > ^ > SyntaxError: invalid syntax > Complete output from command python setup.py egg_info: > Traceback (most recent call last): > > File "<string>", line 16, in <module> > > File "/home/pk/Work/django-project1/build/PIL/setup.py", line 182 > > print "--- using Tcl/Tk libraries at", TCL_ROOT > > ^ > >SyntaxError: invalid syntax > >---------------------------------------- >Cleaning up... >Command python setup.py egg_info failed with error code 1 in /home/pk/Work/django-project1/build/PIL >Storing complete log in /home/pk/.pip/pip.log
but it seems that without virtualenv sourced PIL is set normally.
source share