Comment 1 for bug 1560340

Revision history for this message
Andreas Roehler (a-roehler) wrote : Re: [Bug 1560340] [NEW] How to use emacs to open a remote python shell with python-mode and tramp?

On 22.03.2016 07:38, zhangnan wrote:
> Public bug reported:
>
> My emacs24.5 installed in Cygwin64 in a win7 and remote python27 is
> installed by anaconda2 on another PC with CnetOS 7. My emacs config file
> about python likes:
>
> (provide 'setup-python)
> (require 'python-mode)
>
> (setq python-shell-virtualenv-path "/ssh:<email address hidden>:/home/username/anaconda2/")
> (add-hook 'python-mode-hook 'anaconda-mode)
>
> First, I should run C-x C-f /ssh:username@ip: to input password and open
> a remote file through Tramp. Then run M-x python to open a python shell
> remotely. However, there are some thing wrong responsed by remote python
> like:
>
> 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'
> >>>
>
> Why there are many IOError? How to solve them?
>
> ** Affects: python-mode
> Importance: Undecided
> Status: New
>

Thanks reporting. Please follow recipe given at

http://stackoverflow.com/questions/36118022/using-tramp-in-python-shell-from-cygwin-emacs24-5/36131293?noredirect=1#comment59927166_36131293

starting from emacs -Q