connecting spyder to remote server via ssh
See original GitHub issueI’m having ubuntu 16.04 on my desktop and server. Now I am trying to connect the spyder to my remote server. details about the spyder on my desktop: I have spyder 4.1.1 now and Python 3.6.6 64-bit | Qt 5.9.6 | PyQt5 5.9.2 | Linux 4.15.0-106-generic I read the explanation on spyder website.
I think my lack of knowledge is the problem. I appreciate if someone can help me with the steps. Here is what I did so far:
In my server machine in the terminal I did:
python -m spyder_kernels.console
and it shows:
based on the tutorial now I should do this:
Copy the connection file (jupyter/runtime/dir/path/kernel-pid.json) to the machine you’re running Spyder on (if remote) or note its location (if local).
I am not sure where should I find this file and where should I copy this?
I want to run spyder on my desktop while running the code in the server, so I am confused a little where should I run python -m spyder_kernels.console
and where I should find it, and where I should copy/paste it?
In the tutorial, it says: You can get jupyter/runtime/dir/path by executing jupyter --runtime-dir in the same Python environment as the kernel.
but I am not using jupyter so I am not sure how it is even related?
I appreciate any help in this regard. I have not moved to the next steps since I got stuck at the beginning.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
@goanpeca Thanks man! It seems like it is working well now, every 10 min it repeated again so there might be something deep there that you guys want to look into, but in general, it looks like it is working well. This just added one more reason for me to LOVE spyder!
For newbies like me that might have a little problem doing it, here is what I did:
read this spyder tutorial on how to install the requirements and stuff. I want to run spyder on my desktop and connect it to my server, and I am using ssh usually to do it. both my systems are ubuntu 16.04.
kill the other kernels on your server, not sure if it is a right way, but i did it with
kill -l
on the server run
jupyter --paths
to know where the kernel will be saved, you need to copy the runtime pathon the server do:
python -m spyder_kernels.console
or if you already have the kernel created, do this:python -m spyder_kernels.console -f kernel-xxx.json
apparently the second one works better.go to the runtime path and copy the json file and paste it on your desktop
I also kill the kernels on my desktop (not sure if it is necessary)
open the spyder on your desktop and follow the steps as mentioned here
if you want to know how to create and use ssh-file-key see here
After these steps everything look like working fine. One thing that bug me kinda but apparantly is not important is that I see
in the server terminal, I did a little search to see if I can fix it, I tried to do:
on both server and desktop, but they didn’t help. If someone figure that out, please let us know
@seyeeet see this issue. https://github.com/spyder-ide/spyder/issues/10240