-1

I'm trying to install PIL on snow-leopard , but I am running into a few problems. 1st this system needs to be cleaned up, too many tests with macports, easy_install etc.. I thing I might have too many versions of python in there... but that is not really the problem. It seems that no matter what I try I can't get PIL to be installed.

I tried using macports and that concludes properly, but

Python 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 15:22:34) 
 [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
 >>> 

I tried instaling via easy_install and pip and there is always an error like this

So I read up and found that xcode4 causes some problems and tried installing python27 through the python.org website installer, and then retrying... same problems.

Finally I tried using the macports version of 2.7, but I am unable to... It installs, but I am unable to

Current state of things: .profile has this : export PATH=/opt/local/bin:/opt/local/sbin:/usr/local/mysql/bin:$PATH yet which python reports : /Library/Frameworks/Python.framework/Versions/2.7/bin/python

and still no way to install PIL.

What am I missing??

EDIT:

Ok seing the feedback, I've not been able to install PIL and that is the problem of course.

smci
  • 26,085
  • 16
  • 96
  • 138
cromestant
  • 642
  • 2
  • 10
  • 20

2 Answers2

0

As utdemir commented, try using

from PIL import Image
djhoese
  • 2,958
  • 23
  • 40
0

Ok after finding out more, I was able to install it to the macports 2.7 using sudo port install py2.7 then the pil.

As i suspected the problem persisted when I launched python it was not the macports version that was fired up but the other one.. the .profile had everything needed for it to be loaded from /opt/local/bin and yet id did not load. there was a conflicting PATH mod in my .bash_profile which was added by one of the other installs. Commenting it out worked perfectly and

import Images works... ( not from PIL...)

cromestant
  • 642
  • 2
  • 10
  • 20