简体   繁体   English

在emacs中安装IPython

[英]Installing IPython in emacs

My apologies if this is a repost. 如果这是转贴,我表示歉意。 I couldn't find a similar one in the questions. 我在问题中找不到类似的人。

I am trying to set up emacs as my python IDE with IPython in it. 我正在尝试将emacs设置为带有IPython的python IDE。 Basically follow this http://www.jesshamrick.com/2012/09/18/emacs-as-a-python-ide/ 基本上遵循此http://www.jesshamrick.com/2012/09/18/emacs-as-a-python-ide/

The version of python in my emacs shell is 2.7.5 whereas the one in terminal 2.7.6. 我的emacs shell中的python版本是2.7.5,而终端2.7.6中的版本是python。 However typing ipython in to the emacs shell shows ipython is not installed, but I was able to install ipython to the terminal. 但是,在emacs shell中键入ipython会显示未安装ipython,但是我能够将ipython安装到终端。

I would like to know how to install the ipython plugin to the .emacs file. 我想知道如何将ipython插件安装到.emacs文件。 When you say install, does it mean copy the files and put it there ? 当您说安装时,是否意味着复制文件并将其放在那里? If yes, I have done this. 如果是,我已经做到了。 However when I try to run a python program, it shows "Searching for program: No such file or directory, ipython. Thanks in advance for the help. 但是,当我尝试运行python程序时,它显示“正在搜索程序:ipython没有此类文件或目录。在此先感谢您的帮助。

emacs错误的屏幕截图

It seems that your emacs cannot find ipython. 看来您的emacs找不到ipython。 You may need to set PATH environment variable, but for now, I think this works... 您可能需要设置PATH环境变量,但是现在,我认为这可行...

In your terminal do which ipython , and you will get your ipython executable path. 在终端中执行which ipython ,您将获得ipython可执行文件路径。 Then in your .emacs file, change "ipython" in the following line to whatever the absolute path that you get. 然后在您的.emacs文件中, "ipython"中的"ipython"更改为您获得的绝对路径。

(setq-default py-shell-name "ipython")

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM