- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
首先,如果我的问题很愚蠢,请原谅。但是,我无法解决我遇到的问题。
我将开始一个关于 Python 的项目,并希望使用 Emacs 作为默认编辑器。我想首先设置我的环境以便高效工作。在之前的项目中,我使用了现有的环境,但想在本地计算机上拥有自己的环境。我使用的是 Mac OS 10.12.6。
我首先下载了 Python2.7.10 和最新的 Emacs——版本 26.1。我读到 Elpy 是最好的 Python 开发环境之一,并下载了它。
这是我的 .emacs 文件。它位于我的主目录中(当然不是最佳目录)。
;; init.el --- Emacs configuration
;; INSTALL PACKAGES
;; --------------------------------------
(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa.org/packages/") t)
(package-initialize)
(when (not package-archive-contents)
(package-refresh-contents))
(defvar myPackages
'(better-defaults
elpy ;; add elpy package
material-theme))
(mapc #'(lambda (package)
(unless (package-installed-p package)
(package-install package)))
myPackages)
;; BASIC CUSTOMIZATION
;; --------------------------------------
(setq inhibit-startup-message t) ;; hide the startup message
(load-theme 'material t) ;; load material theme
(global-linum-mode t) ;; enable line numbers globally
;; init.el ends here
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(package-selected-packages
(quote
(python-environment elpygen py-autopep8 material-theme elpy better-
defaults))))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
(elpy-enable)
在 Emacs 上,我想启用 Elpy。查看配置,我得到以下内容
Virtualenv........: None
RPC Python........: 2.7.10 (/usr/bin/python)
Interactive Python: python (/usr/bin/python)
Emacs.............: 26.1
Elpy..............: 1.24.0
Jedi..............: Not found
Rope..............: Not found
Autopep8..........: Not found
Yapf..............: Not found
Black.............: Not found
Syntax checker....: Not found (flake8)
...
The jedi package is not available. Completion and code navigation will
not work.
[run] easy_install --user jedi
...
我已经使用以下命令安装了 Jedi、Rope 等
pip install jedi, rope
通过单击“运行”,我收到以下消息:
Traceback (most recent call last):
File "/usr/bin/easy_install-2.7", line 7, in <module>
from pkg_resources import load_entry_point
ImportError: No module named pkg_resources
我尝试了这个问题中所做的事情: No module named pkg_ressources 。我更新了当前版本的 pip、setuptools、distribute,...但没有任何效果。我应该删除所有内容并重新开始(如果不删除所有内容,可能会很危险)?
我真的不知道从哪里开始。重新安装 setuptool 包没有改变任何东西。
之前我安装了Python3.x,也许它搞砸了安装。
感谢任何帮助。
非常感谢。
最佳答案
据我所知current recommendation就是在你的虚拟环境中安装 Jedi/Rope。对于其他要求,您可能可以通过修改 $PATH
环境变量来摆脱困境。
关于python - Emacs Elpy 找不到包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52372992/
我通过“emacs --daemon”启动了 emacs 服务器。然后我开了几个客户端。 我想将 .emacs 配置的更改应用于所有客户端,而无需重新启动 emacs 守护程序。这可能吗? 最佳答案
我通过“emacs --daemon”启动了 emacs 服务器。然后我开了几个客户端。 我想将 .emacs 配置的更改应用于所有客户端,而无需重新启动 emacs 守护程序。这可能吗? 最佳答案
我看到了一些关于使 emacs 便携(在 Windows 上)的建议。我的 site-start.el 中有这个: (defvar program-dir (substring data-direct
我是一名狂热的 Vim 用户。我的 Vimrc 有 800 多行。我是一个喜欢定制环境的每个部分的修补匠。 Emacs 似乎更容易配置。所以我尝试一下 Emacs。 当您想要缩小时,请按 Emacs
我是一名狂热的 Vim 用户。我的 Vimrc 有 800 多行。我是一个喜欢定制环境的每个部分的修补匠。 Emacs 似乎更容易配置。所以我尝试一下 Emacs。 当您想要缩小时,请按 Emacs
偶尔在term中使用emacs时模式我会误运行emacs file而不仅仅是打开文件。这将在当前客户端内创建一个嵌套的 emacs 客户端。我的问题是如何只关闭内部客户端? 最佳答案 回答 您应该可以
我一直在慢慢学习 elisp 和 emacs 的新命令,并且一直在稳步构建我的 .emacs。必须保持控制台打开以重复打开和关闭 emacs 实例似乎不是测试的最佳选择,但是从 emacs 中运行 e
我正在寻找一个 emacs 服务器,以便 emacsclients 指定的文件 是相对于 emacsclients 的文件系统而不是服务器的文件系统。例如,如果我设置一个 机器“darkstar”上的
我试图将我所有的 emacs 配置置于版本控制之下,以便在不同的计算机之间轻松切换。实际上我的首选系统是 OSX (10.8.3) 和来自 http://emacsformacosx.com/ 的 e
我正在学习 emacs,我认为使用 emacs 的内置帮助功能开发设施将真正平滑学习击键的学习曲线。 使用 emacs 的内置帮助功能来查找命令名称及其击键的有效过程是什么? 例如,我忘记了关闭框架的
我一直在尝试将 emacs minibuffer 的字体/字体与 emacs 默认字体分开,但没有太多运气。 具体来说,我有兴趣使 minibuffer 字体大小更大以用于 emacs MULE,因为
大约 4 年以来,我一直是一个相当普通的 emacs 用户,但在自定义 emacs 和排除 elisp 故障时,我仍然是新手。最近,我开始自定义 emacs 作为我的 ruby 开发环境,并且我从
我希望 emacs 能够处理一些耗时的任务,而不阻塞输入。为此,我尝试了(其中插入的意思是用耗时的任务来代替) (call-process "emacs" nil 0 nil "--eval=(ins
我的 init.el 中有这个设置 (desktop-save-mode 1) 这很好用,只是我想知道: 如何更改它以将 .emacs.desktop 文件保存到 ~/.emacs.d 而不是 ~/
我是 Emacs 包的作者,偶尔在处理我的包时,我会遇到一个看起来很有用的函数并在我的代码中使用它。然后,在我发布后不久,有人使用旧的 Emacs 版本(但仍然是我想要支持的版本)会报告该功能未定
我用 (message "..some text...") 在我的 init 文件中,在 EMACS 加载时将消息发送到消息缓冲区。这是我查看我刚刚所做的更改导致启动崩溃的快速方法。 但是,我无法找到
简单的问题,我在 Emacs 中使用通用模式进行颜色编码。除了在这种语言中 " 和 ' 可以用来表示字符串之外,下面的代码很好用,如 'this is a string' 或 “这是一个字符串”。默认
有没有办法让我的 Emacs 以预定义的框架作为我附加的屏幕截图开始?我不太熟悉如何在我的 .emacs 脚本中执行此操作... 就这么简单: split-window-horizontally(
在emacs markdown-mode写markdown时,我想让electric-pair-mode自动关闭**bold**和 *italic*成对语法,即当输入一个 * 一秒时 * 应该自动出现
Emacs 是否有一个简单的原始缩进模式可以执行以下操作: 当我转到新行(按 Enter)时,复制上述行 用于缩进的任何空格 当我按 Tab 时,在我按 Tab 的地方插入可以配置的缩进字符(空格/制
我是一名优秀的程序员,十分优秀!