0
我喜歡Emacs,但我堅持使用Windows 7.我已經安裝了Cygwin,並且可以使用Emacs進行基本的編輯任務。我可以設置Emacs運行IPython的Cygwin安裝,但我寧願運行Enthought Python Distribution版本的IPython。如何在Cygwin下的Emacs中爲我的Enthought Python Distrubution安裝運行IPython?
在從here意見,我增加了以下我~/.emacs
文件:
(when (executable-find "ipython")
(setq
python-shell-interpreter "/cygdrive/c/Python27/Scripts/ipython.bat"
python-shell-interpreter-args ""
python-shell-prompt-regexp "In \\[[0-9]+\\]: "
python-shell-prompt-output-regexp "Out\\[[0-9]+\\]: "
python-shell-completion-setup-code
"from IPython.core.completerlib import module_completion"
python-shell-completion-module-string-code
"';'.join(module_completion('''%s'''))\n"
python-shell-completion-string-code
"';'.join(get_ipython().Completer.all_completions('''%s'''))\n"))
注意我修改了第三行指向ipython.bat
。然後我開始解釋,它加載EPD,但我得到以下錯誤,不能做任何事情:
---------------------------------------------------------------------------
IOError Traceback (most recent call last)
C:\Users\username\My Documents\python\<ipython-input-2-6552ae2ca310> in <module>()
----> 1 __pyfile = open('''/tmp/py6644bAS''');exec(compile(__pyfile.read(), '''/tmp/py6644bAS''', 'exec'));__pyfile.close()
IOError: [Errno 2] No such file or directory: '/tmp/py6644bAS'
---------------------------------------------------------------------------
IOError Traceback (most recent call last)
C:\Users\username\My Documents\python\<ipython-input-3-492fce3681b4> in <module>()
----> 1 __pyfile = open('''/tmp/py6644XOK''');exec(compile(__pyfile.read(), '''/tmp/py6644XOK''', 'exec'));__pyfile.close()
IOError: [Errno 2] No such file or directory: '/tmp/py6644XOK'
任何意見或其他方式,讓我通過Cygwin運行環保署IPython都安裝在Emacs?
這確實有助於在一定程度上:我也有安裝了Enthought Canopy,它有一個ipython.exe腳本而不是ipython.bat。 – user3609282