开发者

How can I change default python version EMACS 23 uses?

开发者 https://www.devze.com 2023-03-05 08:05 出处:网络
Trying to change the version of python emacs uses. (OSX10.开发者_JS百科6) In Terminal python brings up the version I\'ve set up in PATH

Trying to change the version of python emacs uses. (OSX10.开发者_JS百科6)

In Terminal python brings up the version I've set up in PATH But in EMACS it does not.

How can I change this?


Another option is to look into fixing the environment variable PATH for Emacs which is a little tricky when using Emacs on Mac OS. Just make sure that Emacs' PATH has the same value as PATH in Terminal.app/Bash. These links should help:

Accessing OS X / UNIX environment variables in Emacs minibuffer

http://www.emacswiki.org/emacs/EmacsApp

(cf. Section "Path" and "Alternative Path Solution")


The easiest way (assuming you are running the GUI version of Emacs), is to choose

Options->Customize Emacs->Specific Option

and type python-python-command, and fill in the path to the python you want. Then save for future sessions and you should be good.

I'm really not sure why it wouldn't be honoring the path variable. The default should be simply "python" (no path). Maybe you have already set this, or you are changing the command path in your .emacs? You could look in ~/.emacs and see if you are doing either of those.


try to add this to your .emacs or other config file:

(setq python-version-checked t)
(setq python-python-command "python2.7")
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号