Chances are it is a path problem. When you start an emacs from the terminal, your PATH
environment variable presumably includes the MacPorts bin directory /opt/local/bin
because presumably you modified one of your shell profiles, probably .bash_profile
, to include that directory on PATH
.
But when you launch an application directly (by double-clicking it) the shell is not involved so, by default, /opt/local/bin
doesn't get included in the process's PATH
variable. Depending on how Pymacs, et al, invoke python, it most likely ends up with the Apple-supplied python2.6 (python
or /usr/bin/env python
). If you can figure out where it's calling python, you could change that to an absolute path, like /opt/local/bin/python2.6
.
If you can't figure out how to do that, you may be able to work around the problem by either modifying the plist file inside of the Carbon Emacs.app
bundle to include a LSEnvironment
key with the proper value for PATH
. Or you can create a user-wide environment definition for PATH
in ~/.MacOSX/environment.plist
. Both options are described here.
Otherwise you could try installing Pymacs with the Apple-supplied Python 2.6.1.
By the way, the installation instructions in the link you cite use easy_install
. If you need to install packages into the MacPorts python, make sure you install and use an easy_install
instance for it and not use the Apple-supplied one in /usr/bin
:
$ sudo port install py26-setuptools
$ /opt/local/bin/easy_install-2.6 <package>