Upgraded python not finding Macport installed modules

D B dkbyrne at gmail.com
Mon Feb 22 16:59:12 PST 2010


Hello,
I am using Mac OS X 10.5.8 and I previously upgraded from the
manufacturer-installed Python 2.5.1 to Python 2.6.4. I recently tried using
MacPorts to install the python module py-pil (Python Imaging Library,
http://www.pythonware.com/products/pil/index.htm) and it seemed to install
successfully. However, when I tried to execute "import Image" from the
Python interpreter (according to the tutorial
http://www.pythonware.com/library/pil/handbook/introduction.htm), the error
"ImportError: No module named Image" was returned (N.B. the interpreter
shows that it is configured for Python 2.6.4).  At the terminal I get the
following:

$ locate py-pil
/opt/local/var/macports/sources/
rsync.macports.org/release/ports/python/py-pil

$ which python
/Library/Frameworks/Python.framework/Versions/2.6/bin/python

This seems to indicate that perhaps MacPorts is configured for the older
Python version. How can I resolve this? Should I uninstall MacPorts
(although I was warned by the MacPorts Guide against doing, thus this email)
and try to re-install it? Or is there an easier way that I can re-configure
MacPorts? I'm relatively new to all this and I haven't yet found a clear
solution in my online searches.
Thank you for any assistance,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20100222/ecf2e91d/attachment.html>


More information about the macports-users mailing list