PDA

View Full Version : What is the best way install PIL?



cafodca
05-14-2012, 10:58 AM
Hi, i boungt new hosting acccount in bluehost i work in pyhton, django i install virtualenv and then install django with pip
when i install PIL this install not support jpeg, png etc. and now NOT found LIB for compile with this options or support jpeg, jpg, png etc

My question: What is the best way install PIL with SUPPORT the format jpeg,jpg,png etc?

thank you

cafod

Zora2012
11-21-2012, 08:28 PM
$(sudo pip install PIL) concludes with "Successfully installed PIL", but importing the Image module fails with "No module named Image". Python from python.org, no virtualenv.

polyergic@laconic : ~/Downloads $ uname -a
Darwin laconic 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug 23 16:26:45 PDT 2012; root:xnu-1699.32.7~1/RELEASE_I386 i386
polyergic@laconic : ~/Downloads $ which pip
/Library/Frameworks/Python.framework/Versions/2.7/bin/pip
polyergic@laconic : ~/Downloads $ sudo pip install PIL
Password:
Requirement already satisfied (use --upgrade to upgrade): PIL in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PIL
Cleaning up...
polyergic@laconic : ~/Downloads $ which python
/Library/Frameworks/Python.framework/Versions/2.7/bin/python
polyergic@laconic : ~/Downloads $ python
Python 2.7.3 (v2.7.3:70274d53c1dd, Apr 9 2012, 20:52:43)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import Image
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named Image
>>> quit()
polyergic@laconic : ~/Downloads $