首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Emacs Elpy找不到包裹

Emacs Elpy找不到包裹
EN

Stack Overflow用户
提问于 2018-09-17 17:30:16
回答 1查看 1.4K关注 0票数 1

首先,如果我的问题很愚蠢,请原谅。然而,我不能解决我所遇到的问题。

我将在Python上开始一个项目,并希望使用Emacs作为默认编辑器。我想首先建立我的环境,以便有效地工作。在以前的项目中,我使用了现有的环境,但希望在本地机器上拥有自己的环境。我在MacOS10.12.6上。

我从下载Python2.7.10和最新的Emacs开始--版本26.1。我读到Elpy是Python最好的开发环境之一,并下载了它。

这是我的.emacs文件。它位于我的主目录中(肯定不是最优的)。

代码语言:javascript
复制
;; 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。查看配置,我得到以下信息

代码语言:javascript
复制
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

...

我已经安装了绝地,绳索,.,有以下命令

代码语言:javascript
复制
pip install jedi, rope

通过单击"run",我得到以下消息:

代码语言:javascript
复制
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

我尝试了这个问题中所做的事情:资源来源。我更新我当前版本的pip,setuptools,分发,.但什么都不管用。我是否应该删除所有内容并重新启动(如果不删除所有内容,可能会很危险)?

我真的不知道从哪里开始。重新安装setuptool包没有更改任何内容。

以前,我安装了Python3.x,可能它破坏了安装。

任何帮助都是非常感谢的。

非常感谢。

EN

回答 1

Stack Overflow用户

发布于 2019-07-03 07:02:25

现行建议将在你的虚拟环境中安装绝地/绳索。对于其他需求,您可能可以修改$PATH环境变量。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/52372992

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档