1

I'd like to use Aquamacs to edit python files, and change the interpreter to use a version of python I installed via MacPorts, rather than the default version. I saw in a previous question that this may be fixed by "pointing" the preferences file to the version I'm using. However, I can't find documentation on how that "pointing" is done.

My preferences file is located at: ~/Users/Me/Library/Preferences/Aquamacs Emacs/Preferences.el

The version of python I want to use is located at: ~/Applications/MacPorts/Python 2.7

Sorry if this question is already answered--I'm new to both Aquamacs and Python, and am not sure if I'm using the right vocabulary to search for the answer.

Thanks!

Community
  • 1
  • 1
sudo make install
  • 5,629
  • 3
  • 36
  • 48
  • Does http://stackoverflow.com/questions/2515754/changing-python-interpreter-for-emacs help? Another option is to find the `python-mode.el` file and see if you can set the interpreter there. –  Jun 18 '13 at 16:43
  • @Evert -- Thanks for the reply! I tried adding (setq python-python-command "~/your/python/bin-dir/python") to the preferences file above, but it is still using the ~/Library/Frameworks/Python.framework/Version/2.7 version. – sudo make install Jun 18 '13 at 18:25
  • Also, I was able to find the python-mode.el directory, containing "Portfile," but I'm not sure how to proceed from there. – sudo make install Jun 18 '13 at 18:39
  • Did you already adjust the Emacs path to the macports `.../bin` installation? I don't think you should be pointing at the application. `(setenv "PATH" (concat (getenv "PATH") ":/opt/local/bin"))` and `(setq exec-path (append exec-path '("/opt/local/bin")))` The `.../bin` may be a level or two deeper than in this example -- peek around in there to find it. – lawlist Jun 19 '13 at 03:03
  • There was also an option when installing python through macports to `sudo port -f activate python27` and `sudo port select --set python python27`. Check to see you have done that. If this helps, let me know and I'll post an answer with both comments. The paths in the prior comment assume you didn't modify the location during the installation of macports with `--prefix=...`. If you modified the path during installation, naturally your path would need to match within the `Preferences.el` file. – lawlist Jun 19 '13 at 03:12

0 Answers0