如何使Emacs在雪豹中拾取正确的蟒蛇? [英] How to make Emacs pickup the correct python in Snow Leopard?

查看:136
本文介绍了如何使Emacs在雪豹中拾取正确的蟒蛇?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

与我之前的问题相关:不是从Emacs24 Carbon开始的Pymacs



Ropemacs将无法加载,因为emacs没有看到正确的site-packages目录(参见前面的问题,例如输出)。



我正在使用Snow Leopard,通过homebrew安装开发版本的emacs24。

  $ emacs --version 
GNU Emacs 24.0.93.1

Python也通过自制软件安装,首先将它设置在我的路径前面。

  $ python --version 
Python 2.7.2

我使用zsh作为登录shell。



如果我输入 M-! python --version 到emacs,它返回 Python 2.6.1 ,即使在我的shell中, / usr / local / bin 在我的PATH中位于 / usr / bin 之前。事实上,emacs认为我的路径是颠倒的,在这个意义上,默认的Python框架超出了我喜欢的python。我认为这可能是由 path_helper 引起的。



zsh路径:

  $ echo $ PATH 
/ Users / jrhorn424 / bin:/ usr / local / bin:/ usr / local / sbin:/ usr / bin:/ bin :* snip *

emacs路径:

  M-! echo $ PATH [RET] 
/ usr / bin:/ bin:/ usr / sbin:/ sbin:/ usr / local / bin:* snip *

我将zsh路径复制到〜/ .MacOSX / environment.plist 中,但这并不妨碍

可能相关: Emacs在运行编译命令时忽略了我的路径



我已经实现了这个解决方案,它包含在 PATH问题解决方案列表,但我仍然得到上面的结果。也许这些解决方案有点过时了?



告诉我升级到Lion,如果你能说服我,这将解决我的问题,可以,但我宁愿留下现在有雪豹。

解决方案

编辑 / etc / path 作为管理员),并将行 / usr / local / bin 行移动到文件的顶部。


Related to my previous question: Pymacs not starting on Emacs24 Carbon

Ropemacs won't load, since emacs isn't seeing the correct site-packages directory (see the previous question for example output).

I'm using Snow Leopard, with the dev version of emacs24 installed through homebrew.

$ emacs --version
GNU Emacs 24.0.93.1

Python is also installed through homebrew, and preferred by setting it at the front of my path.

$ python --version
Python 2.7.2

I use zsh as my login shell.

If I type M-! python --version into emacs, it returns Python 2.6.1, even though in my shell, /usr/local/bin is ahead of /usr/bin in my PATH. Indeed, emacs thinks my path is "reversed", in the sense that the default Python framework is ahead of my preferred python. I think this may be caused by path_helper.

zsh PATH:

$ echo $PATH
/Users/jrhorn424/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin: *snip*

emacs PATH:

M-! echo $PATH [RET]
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin: *snip*

I have the zsh path copied into ~/.MacOSX/environment.plist, but that doesn't prevent /usr/bin from prefixing in emacs.

Possibly related: Emacs is ignoring my path when it runs a compile command

I've implemented that solution, which is included in this list of solutions to the PATH problem, but I'm still getting the results above. Perhaps these solutions are a bit dated?

Telling me to upgrade to Lion, if you can convince me it will solve my issue, is OK, but I would prefer to stay with Snow Leopard for now.

解决方案

Edit /etc/path (as an administrator) and move the line /usr/local/bin to the top of the file.

这篇关于如何使Emacs在雪豹中拾取正确的蟒蛇?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆