【问题标题】:Pymacs error starting Emacs after installing Python安装 Python 后启动 Emacs 时 Pymacs 出错
【发布时间】:2011-04-27 04:05:00
【问题描述】:

我使用其中一个 msi 文件安装了 python。但是当我启动 emacs 时,它给了我:

问题 1,我认为我已经解决了

当我运行 cmd 并输入 python 时,我得到了

"python" is not recognized as an internal or external command, operable program or batch file.

所以从在线资源(windows 7 btw)转到系统属性和环境变量并为我的特定用户添加了一个用户变量

路径和 %PATH%;C:\Python27

它工作了一点,但不是。

问题 2:

pymacs-report-error: Pymacs helper 没有在 30 秒内启动

我不知道为什么。我该如何解决这个问题?

【问题讨论】:

  • 您是否检查过 pymacs 是否按照文档中所说的那样工作? :pymacs.progiciels-bpi.ca/pymacs.html#check-if-pymacs-would-work
  • 你能给我们一个安装顺序吗?另外,您使用的是哪个版本的 Pymacs?我以前遇到过这个问题,我自己解决了。但首先我需要知道我们是否有同样的问题。

标签: python emacs pymacs


【解决方案1】:

我认为您的可执行文件必须是“python”而不是“python2.7”(例如)。

此外,Pymacs 必须安装到 python 目录的 site-packages 目录(或 PYTHONPATH 环境变量中的目录)(在基于 UNIX 的系统上,我使用“pip”或“easy_install”)。

最后,pymacs.el 必须放在你的 ~/.emacs.d/vendor/ (例如)目录中(在 windows 上,参考this post)并正确加载。

在我的 ~/.emacs.d/init.el 我有这个:

(setq my-dot-emacs-dir "~/.emacs.d")
(setq my-vendor-emacs-dir (concat my-dot-emacs-dir "/vendor"))
(add-to-list 'load-path my-vendor-emacs-dir)

您可以调整此代码以自动加载位于 .emacs.d/vendor/ 中的 .el 文件

【讨论】:

  • 对我来说(ubuntu 11.10 和 12.04)问题是由安装在 dist 包中的 pymacs 引起的——这似乎是一个known issue。我尝试通过 pip 安装,但这似乎没有正确构建 python 库。最后我做到了cp cp -r /usr/share/pyshared/Pymacs /my/virtualenv/lib/python2.7/site-packages/
猜你喜欢
  • 2013-06-19
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-05-28
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多