I've followed the EnigmaCurry instructions for setting up a good python IDE in emacs. I didn't follow verbatim, since a bit has changed in emacs24 and I use customizer heavily to set options. In any case, when I was setting up flymake, I ran into a problem whereby Carbon Emacs doesn't have the same PATH as my shell, which I fixed by doing this.
I suspect something similar is happening with pymacs. Starting emacs, I get this error:
error: Pymacs helper did not start within 30 seconds
Inspecting the *Pymacs*
buffer, I note:
ImportError: No module named Pymacs
My site-packages directory is in both my PATH and PYTHONPATH variables, but emacs seems to be overriding PYTHONPATH. To illustrate, if I type python -c "import sys; print sys.path"
in a shell, I get:
['', '/usr/local/Cellar/python/2.7.2/ ... *snip* ]
But if I do the same in emacs through M-! python -c "import sys; print sys.path" [RET]
, I get:
['', '/usr/local/share/python',
'/System/Library/Frameworks/Python.framework/Versions/2.6/ ... *snip* ]
IIUC, this means emacs is picking up the Mac factory default python framework, in addition to correctly picking up my manually created PYTHONPATH shell variable (the second list item). Yet, pymacs can't be found.
I've set python-python-command
to python2.7
even though the correct python is ahead of that on the path. That is, python --version
in a shell is 2.7, but in emacs it is 2.6.
I'm running the latest carbon emacs24 installed using homebrew.