2
0
mirror of https://github.com/LCTT/TranslateProject.git synced 2025-01-31 23:30:11 +08:00

Merge pull request from wxy/20190109-Configure-Anaconda-on-Emacs---iD

PRF&PUB:20190109 Configure Anaconda on Emacs   iD
This commit is contained in:
Xingyu.Wang 2019-03-10 11:49:03 +08:00 committed by GitHub
commit 72a79b4330
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,25 +1,23 @@
[#]collector(lujun9972) [#]: collector: (lujun9972)
[#]translator(lujun9972) [#]: translator: (lujun9972)
[#]reviewer( ) [#]: reviewer: (wxy)
[#]publisher( ) [#]: publisher: (wxy)
[#]url( ) [#]: url: (https://linux.cn/article-10604-1.html)
[#]subject(Configure Anaconda on Emacs iD) [#]: subject: (Configure Anaconda on Emacs iD)
[#]via(https://idevji.com/configure-anaconda-on-emacs/) [#]: via: (https://idevji.com/configure-anaconda-on-emacs/)
[#]author(Devji Chhanga https://idevji.com/author/admin/) [#]: author: (Devji Chhanga https://idevji.com/author/admin/)
在 Emacs 上配置 Anaconda 在 Emacs 上配置 Anaconda
====== ======
也许我所求的究极 IDE 就是 [Emacs][1] 了。我的目标是使 Emacs 成为一款全能的 Python IDE。本文描述了如何在 Emacs 上配置 Anaconda。 也许我所求的究极 IDE 就是 [Emacs][1] 了。我的目标是使 Emacs 成为一款全能的 Python IDE。本文描述了如何在 Emacs 上配置 Anaconda。LCTT 译注Anaconda 自称“世界上最流行的 Python/R 的数据分析平台”)
我的配置信息: 我的配置信息:
``` - OSTrisquel 8.0
OS: Trisquel 8.0 - EmacsGNU Emacs 25.3.2
Emacs: GNU Emacs 25.3.2
```
快捷键说明 [(参见完全指南 )][2] 快捷键说明([参见完全指南][2]
``` ```
C-x = Ctrl + x C-x = Ctrl + x
@ -27,25 +25,26 @@ M-x = Alt + x
RET = ENTER RET = ENTER
``` ```
### 1下载并安装 Anaconda ### 1下载并安装 Anaconda
#### 1.1 下载: #### 1.1 下载
[从这儿 ][3] 下载 Anaconda。你应该下载 Python 3.x 版本因为 Python 2 在 2020 年就不再支持了。你无需预先安装 Python 3.x。安装脚本会自动进行安装。
#### 1.2 安装: [从这儿][3] 下载 Anaconda。你应该下载 Python 3.x 的版本,因为 Python 2 在 2020 年就不再支持了。你无需预先安装 Python 3.x。这个安装脚本会自动安装它。
#### 1.2 安装
``` ```
cd ~/Downloads cd ~/Downloads
bash Anaconda3-2018.12-Linux-x86.sh bash Anaconda3-2018.12-Linux-x86.sh
``` ```
### 2、将 Anaconda 添加到 Emacs
### 2。将 Anaconda 添加到 Emacs
#### 2.1 将 MELPA 添加到 Emacs #### 2.1 将 MELPA 添加到 Emacs
我们需要用到 _anaconda-mode_ 这个 Emacs 包。该包位于 MELPA 仓库中。Emacs25 需要手工添加该仓库。
[注意:点击本文查看如何将 MELPA 添加到 Emacs。][4] 我们需要用到 `anaconda-mode` 这个 Emacs 包。该包位于 MELPA 仓库中。Emacs25 需要手工添加该仓库。
- [注意:点击本文查看如何将 MELPA 添加到 Emacs][4]
#### 2.2 为 Emacs 安装 anaconda-mode 包 #### 2.2 为 Emacs 安装 anaconda-mode 包
@ -60,8 +59,7 @@ anaconda-mode RET
echo "(add-hook 'python-mode-hook 'anaconda-mode)" > ~/.emacs.d/init.el echo "(add-hook 'python-mode-hook 'anaconda-mode)" > ~/.emacs.d/init.el
``` ```
### 3、在 Emacs 上通过 Anaconda 运行你第一个脚本
### 3。在 Emacs 上通过 Anaconda 运行你第一个脚本
#### 3.1 创建新 .py 文件 #### 3.1 创建新 .py 文件
@ -83,7 +81,7 @@ C-c C-p
C-c C-c C-c C-c
``` ```
输出为 输出为
``` ```
Python 3.7.1 (default, Dec 14 2018, 19:46:24) Python 3.7.1 (default, Dec 14 2018, 19:46:24)
@ -94,8 +92,9 @@ Type "help", "copyright", "credits" or "license" for more information.
>>> >>>
``` ```
我是受到 [Codingquark;][5] 的影响才开始使用 Emacs 的。 我是受到 [Codingquark][5] 的影响才开始使用 Emacs 的。
有任何错误和遗漏请在评论中之处。干杯!
有任何错误和遗漏请在评论中写下。干杯!
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
@ -104,7 +103,7 @@ via: https://idevji.com/configure-anaconda-on-emacs/
作者:[Devji Chhanga][a] 作者:[Devji Chhanga][a]
选题:[lujun9972][b] 选题:[lujun9972][b]
译者:[lujun9972](https://github.com/lujun9972) 译者:[lujun9972](https://github.com/lujun9972)
校对:[校对者ID](https://github.com/校对者ID) 校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出