Ich mag Emacs und möchte eine Python-Shell von Tramp ausführen. Mein emacs24.5 installiert in Cygwin64 in einem win7 und Fern python27 von anaconda2 auf einem anderen PC mit CnetOS installiert ist 7. Meine Emacs-Konfigurationsdatei über Python mag:Verwenden von Tramp in Python-Shell von Cygwin emacs24.5
(provide 'setup-python)
(require 'python-mode)
(setq python-shell-virtualenv-path "/ssh:[email protected]:/home/username/anaconda2/")
(add-hook 'python-mode-hook 'anaconda-mode)
Zuerst soll ich C-x C-f /ssh:[email protected]:
zur Eingabe von Passwort laufen und öffnen eine Remote-Datei durch Tramp. Führen Sie dann M-x python
aus, um eine Python-Shell remote zu öffnen. Allerdings gibt es einige, was falsch fern Python responsed wie:
Python 2.7.11 |Anaconda 2.4.1 (64-bit)| (default, Dec 6 2015, 18:08:32)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> Traceback (most recent call last):
File "<stdin>", line 1, in <module>
IOError: [Errno 2] No such file or directory: '/usr/tmp/py-shell-completion-setup-code.py'
>>> Traceback (most recent call last):
File "<stdin>", line 1, in <module>
IOError: [Errno 2] No such file or directory: '/usr/tmp/py-ffap-setup-code.py'
>>> Traceback (most recent call last):
File "<stdin>", line 1, in <module>
IOError: [Errno 2] No such file or directory: '/usr/tmp/py-eldoc-setup-code.py'
>>>
Bitte sagen Sie mir, warum und wie es zu lösen
By the way, wenn ich M-x ipython
zum Öffnen eines ipython Shell ausgeführt, gibt es ein Fehler wie:
Python 2.7.11 |Anaconda 2.4.1 (64-bit)| (default, Dec 6 2015, 18:08:32)
Type "copyright", "credits" or "license" for more information.
IPython 4.0.1 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
: cannot connect to X server
ich weiß nicht, warum es sagt cannot connect to X server
.
Es bedeutet, dass dies ein Fehler in python-mode.el ist? – nannanmath
@nannanmath Noch nicht. Dein Setup sieht seltsam aus. Die Suche nach Fehlern würde weitere Informationen erfordern, die für eine einfache Q/A-Site wie diese nicht geeignet sind. –