question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

connecting spyder to remote server via ssh

See original GitHub issue

I’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:

desktop

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:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
seyeeetcommented, Jun 29, 2020

@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 path

  • on 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

[IPKernelApp] ERROR | No such comm target registered: spyder_api
[IPKernelApp] WARNING | No such comm: dfaf14beba1f11eab6003f3e95b9579a
[IPKernelApp] WARNING | No such comm: dfaf14beba1f11eab6003f3e95b9579a

in the server terminal, I did a little search to see if I can fix it, I tried to do:

conda update jupyter
conda install widgetsnbextension
conda install ipywidgets --no-deps

on both server and desktop, but they didn’t help. If someone figure that out, please let us know

0reactions
goanpecacommented, Jun 29, 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

Run Spyder /Python on remote server - Stack Overflow
(Spyder maintainer here) What you need to do is to create an Spyder kernel in your remote server and connect through SSH to...
Read more >
How to connect your Spyder IDE to an external ipython kernel ...
How to connect your Spyder IDE to an external ipython kernel with SSH PuTTY tunnel · You will generate on your current folder...
Read more >
How to connect local Spyder to a remote kernel through a ...
Spyder includes an automatic remote connection via ssh but only tunnels directly to the server, it does not account for jump hosts.
Read more >
Has anyone been able to connect Spyder to a remote kernel?
I don't think so. If there's one example of one case successfully connecting with Spyder. You can start a ssh server in your...
Read more >
IPython Console — Spyder 5 documentation
Check the This is a remote kernel (via SSH) box and enter the Hostname or IP address, username and port to connect to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found