I fixed this problem two different ways. I changed the /usr/bin/python
symlink to point at /opt/local...../python2.6. this was dumb of me.
I noticed on a `sudo port -d upgrade outdated` that there was a command
that you can install to twiddle the symlinks for you, and I believe it
was called python_select. I don't think it gets installed when you port
install python stuff, but it works like a charm.
Good luck!
On 06/07/2010 08:59 AM, Matthew Gardner wrote:
> I'm trying to install a python package on my mac (nltk) that requires
> another package that I installed (yaml). I've had some messy problems
> with using macports to install python packages, but I think I just found
> out what the problem is. I installed yaml using macports, so it is
> found in /opt/local/lib/.... I've set my PYTHONPATH to use it, so I can
> start python in a terminal and import yaml just fine. But when I try to
> install nltk from source, I run sudo setup.py install, it gives me an
> import error ("No module named yaml"). I discovered that when I just
> type sudo python and get an interactive interpreter, I can't import
> yaml, because /opt/local/lib/... isn't on my PYTHONPATH. I searched for
> a while trying to figure out how to set my system PYTHONPATH on osx, but
> I can't find anything helpful. Any help?
>
> Matt
>
>
>
> --------------------
> BYU Unix Users Group
> http://uug.byu.edu/
>
> The opinions expressed in this message are the responsibility of their
> author. They are not endorsed by BYU, the BYU CS Department or BYU-UUG.
> ___________________________________________________________________
> List Info (unsubscribe here): http://uug.byu.edu/mailman/listinfo/uug-list
--
Stephen M. McQuay
http://stephen.mcquay.me
--------------------
BYU Unix Users Group
http://uug.byu.edu/
The opinions expressed in this message are the responsibility of their
author. They are not endorsed by BYU, the BYU CS Department or BYU-UUG.
___________________________________________________________________
List Info (unsubscribe here): http://uug.byu.edu/mailman/listinfo/uug-list