# Switching from Jupyter to a proper IDE

**URL:** <https://discourse.julialang.org/t/switching-from-jupyter-to-a-proper-ide/31648>\
**Category:** General Usage\
**Created:** [November 29, 2019, 9:43am UTC](https://discourse.julialang.org/t/switching-from-jupyter-to-a-proper-ide/31648 "2019-11-29T09:43:02Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![aplavin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aplavin/32/222056_2.png) [@aplavin](https://discourse.julialang.org/u/aplavin)\
**Post date:** [November 29, 2019, 9:43am UTC](https://discourse.julialang.org/t/switching-from-jupyter-to-a-proper-ide/31648/1 "2019-11-29T09:43:03Z")

</div>

Hi! I’m using JupyterLab for the majority of my work in Julia, and it is definitely lacking in capabilities of IDEs like Juno and Julia plugin for VSCode - like debugging, variable inspection, and so on. Even autoindent doesn’t always work correctly in jupyter. But it turns out not so easy to switch from jupyter, at least I couldn’t find a reasonably documented workflow for my usecase. Main advantages of jupyter as I see it are basically the following:

- The whole julia (and python - mostly used by pycall) setup is run in docker (for easy updates and reproducibility) on one fast machine, where all the data resides as well. Then from any place (2-3 other computers) I can easily use it without worrying about any kind of synchronization. These “other” computers don’t have all the libraries and packages installed, and don’t store my code - it’s located all in one place.
- The very same layout between different computers - e.g. come home, open jupyter, and see exactly the same as you did at work.
- No matter if the internet is fast or slow (think 3G-scale ping) it doesn’t affect typing and looking at previously-generated results and plots. Only the new outputs are slowed down (obviously). And even without internet connection I can see all previous outputs.
- Permanent (until manually removed) display of code blocks and their corresponding results together.
- Multiple independent julia sessions simultaneously, each with its own set of code blocks and results, easily switchable back and forth.

Looking at Atom and VSCode docs I couldn’t easily find how to setup something similar there. Do you think it is possible now, or going to be possible when some planned developments to those IDEs are implemented?

---

<div class="post-metadata">

**Author:** ![sylvaticus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sylvaticus/32/203883_2.png) [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Post date:** [November 29, 2019, 11:55am UTC](https://discourse.julialang.org/t/switching-from-jupyter-to-a-proper-ide/31648/2 "2019-11-29T11:55:57Z")

</div>

To mirror your general architecture you could use Juno connected to a remote server (see [this discussion](https://discourse.julialang.org/t/connecting-juno-to-work-with-julia-installed-on-a-remote-server/7494/21)).

The advantage would be that all the libraries and data for your computations would reside in the server, although the script would still be in your local machine, but at that time you could use on your server NextCloud or something similar in order to have the script automatically synchronised on the server as well.

---

<div class="post-metadata">

**Author:** ![aplavin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aplavin/32/222056_2.png) [@aplavin](https://discourse.julialang.org/u/aplavin)\
**Post date:** [November 29, 2019, 1:53pm UTC](https://discourse.julialang.org/t/switching-from-jupyter-to-a-proper-ide/31648/3 "2019-11-29T13:53:54Z")

</div>

This can make sure files (scripts) are synced, but it’s just one point from the list above… And it’s not clear from the docs if remote server connection in Juno supports plots/interaction?

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [November 29, 2019, 4:57pm UTC](https://discourse.julialang.org/t/switching-from-jupyter-to-a-proper-ide/31648/4 "2019-11-29T16:57:06Z")

</div>

Take a look at the [Visual Studio Online](https://marketplace.visualstudio.com/items?itemName=ms-vsonline.vsonline) and [Remote - SSH](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh) extension for VS Code. They make for an incredibly smooth remote working experience where all your code, setup, data lives on one machine but you edit it from a different one. It should also all work with the Julia extension for VS Code.

---

<div class="post-metadata">

**Author:** ![aplavin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aplavin/32/222056_2.png) [@aplavin](https://discourse.julialang.org/u/aplavin)\
**Post date:** [November 29, 2019, 5:46pm UTC](https://discourse.julialang.org/t/switching-from-jupyter-to-a-proper-ide/31648/5 "2019-11-29T17:46:49Z")

</div>

This does look very interesting, somehow I missed those extensions. Definitely going to try! However, it looks like at least `Remote - SSH` doesn’t support inline or side-by-side plots. Is that true?

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [November 29, 2019, 7:19pm UTC](https://discourse.julialang.org/t/switching-from-jupyter-to-a-proper-ide/31648/6 "2019-11-29T19:19:42Z")

</div>

I think the plot pane in the julia extension should just work with the SSH extension. We don’t have inline plots in general (local or remote).

---

<div class="post-metadata">

**Author:** ![cdsousa](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cdsousa/32/215553_2.png) [@cdsousa](https://discourse.julialang.org/u/cdsousa)\
**Post date:** [November 29, 2019, 9:30pm UTC](https://discourse.julialang.org/t/switching-from-jupyter-to-a-proper-ide/31648/7 "2019-11-29T21:30:09Z")

</div>

I can confirm the plot plane is working over the SSH extension as @davidanthoff said. I use it a lot!

---

<div class="post-metadata">

**Author:** ![aplavin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aplavin/32/222056_2.png) [@aplavin](https://discourse.julialang.org/u/aplavin)\
**Post date:** [December 4, 2019, 10:02am UTC](https://discourse.julialang.org/t/switching-from-jupyter-to-a-proper-ide/31648/8 "2019-12-04T10:02:04Z")

</div>

Thanks for suggestions, I looked in more details into VS Code Remote-SSH and other extensions like hydrogen for Atom. Even though they are more convenient for remote development than just Juno remote, but it looks like none of those solutions a) persist plots and other outputs, so they must be recomputed each time and hope the result doesn’t change; and b) allow “seamless switching” between two computers, i.e. having the very same set of files/sessions active when you move from one PC to another and connect to the same server.  
So it’s nice to see IDEs getting features previously unique to IPython/Jupyter, but it seems that at least for my usage scenario (see 1st post for details) IDEs are not there yet.

---

<div class="post-metadata">

**Author:** ![orialb](https://avatars.discourse-cdn.com/v4/letter/o/65b543/32.png) [@orialb](https://discourse.julialang.org/u/orialb)\
**Post date:** [December 4, 2019, 10:40am UTC](https://discourse.julialang.org/t/switching-from-jupyter-to-a-proper-ide/31648/9 "2019-12-04T10:40:41Z")

</div>

You could use VS code remote (or some other editor with this feature) to develop and make changes to your package/module/jl file, but still do the analysis and plotting using Jupyter (+ Revise.jl ). This way you get the best of both worlds.

EDIT: Also, you could consider using emacs/vim inside a tmux session running on the remote machine in order to have a persistent editor session when you switch machines.

---

<div class="post-metadata">

**Author:** ![aplavin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aplavin/32/222056_2.png) [@aplavin](https://discourse.julialang.org/u/aplavin)\
**Post date:** [December 4, 2019, 1:18pm UTC](https://discourse.julialang.org/t/switching-from-jupyter-to-a-proper-ide/31648/10 "2019-12-04T13:18:50Z")

</div>

> emacs/vim inside a tmux session running on the remote machine

I can imagine emacs being able to keep persisntent plots etc next to corresponding code blocks (however didn’t use those editors myself), but tying everything to a remote session means that without reasonably fast and reliable internet connection it’s impossible to view existing code/results/… In Jupyter obviously one can examine and edit the already loaded page. I often experience poor and dropping connection eg while in transport, and jupyter deals with this pretty well. Also typing delays become very uncomfortable when using remote session like this on mobile connection.

---

<div class="post-metadata">

**Author:** ![orialb](https://avatars.discourse-cdn.com/v4/letter/o/65b543/32.png) [@orialb](https://discourse.julialang.org/u/orialb)\
**Post date:** [December 4, 2019, 1:43pm UTC](https://discourse.julialang.org/t/switching-from-jupyter-to-a-proper-ide/31648/11 "2019-12-04T13:43:16Z")

</div>

> [@aplavin](#):
>
> I can imagine emacs being able to keep persisntent plots etc next to corresponding code blocks (however didn’t use those editors myself)

While it is indeed possible to get plots and Jupyter like experience in emacs (for example using [emacs-jupyter](https://github.com/dzop/emacs-jupyter) + org-mode, not sure if plots can work inside a tmux session though), here I was suggesting it only as replacement to the VS code part of the workflow I suggested and not for the Jupyter part.  
But yes, I guess that with this setup you would not be able to keep working in the editor if your connection dropped (I’ve heard that using mosh instead of ssh is supposed to somehow help with poor connections but not sure exactly what it provides).

---

<div class="post-metadata">

**Author:** ![tanhevg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tanhevg/32/12025_2.png) [@tanhevg](https://discourse.julialang.org/u/tanhevg)\
**Post date:** [December 4, 2019, 1:44pm UTC](https://discourse.julialang.org/t/switching-from-jupyter-to-a-proper-ide/31648/12 "2019-12-04T13:44:46Z")

</div>

I am using Atom/Juno with “ftp remote edit” plugin, and Julia running in a tmux session on the host workstation. So when I connect to it from different editors, the Julia process stays the same, with its workspace. This works reasonably well for me, and I think covers all the use cases that you need. Specifically for plots, you could prepare them in advance, and then just call `display(plt)` when you reconnect from a new editor. Plot pane in Atom works over remote connection.

---

<div class="post-metadata">

**Author:** ![aplavin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aplavin/32/222056_2.png) [@aplavin](https://discourse.julialang.org/u/aplavin)\
**Post date:** [December 4, 2019, 2:20pm UTC](https://discourse.julialang.org/t/switching-from-jupyter-to-a-proper-ide/31648/13 "2019-12-04T14:20:04Z")

</div>

I thought of a similar setup, unfortunately there are several issues with it: a) as I understand, you cannot easily have several independent julia sessions, each automatically corresponding to separate “workspaces”, e.g. directories with source files; b) more importantly, dealing with plots this way doesn’t work across julia restarts, requires to keep references to all the plots, giving them names and not forgetting which is which, and overall is just way too “manual” - compare to notebooks, where all the output (including plots) is unambiguously tied to the code producing it and stored together “forever”.

---

<div class="post-metadata">

**Author:** ![tanhevg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tanhevg/32/12025_2.png) [@tanhevg](https://discourse.julialang.org/u/tanhevg)\
**Post date:** [December 4, 2019, 2:34pm UTC](https://discourse.julialang.org/t/switching-from-jupyter-to-a-proper-ide/31648/14 "2019-12-04T14:34:27Z")

</div>

Atom also has a [Hydrogen](https://atom.io/packages/hydrogen) plugin, that apparently allows you to connect to remote Jupyter kernels. I have not tested it in anger, though.

---

<div class="post-metadata">

**Author:** ![orialb](https://avatars.discourse-cdn.com/v4/letter/o/65b543/32.png) [@orialb](https://discourse.julialang.org/u/orialb)\
**Post date:** [December 4, 2019, 2:58pm UTC](https://discourse.julialang.org/t/switching-from-jupyter-to-a-proper-ide/31648/15 "2019-12-04T14:58:04Z")

</div>

> [@aplavin](#):
>
> b) more importantly, dealing with plots this way doesn’t work across julia restarts, requires to keep references to all the plots, giving them names and not forgetting which is which, and overall is just way too “manual” - compare to notebooks, where all the output (including plots) is unambiguously tied to the code producing it and stored together “forever”.

It sounds as if you really want/need to work with an interactive computational notebook, so why not just continuing working with a Jupyter notebook 🙂 ?  
Again, I personally think that the hybrid workflow is the best here. Do things which are best done in notebooks in Jupyter (plotting, data analysis) and other things (development of packages) in your editor of choice.

---

<div class="post-metadata">

**Author:** ![aplavin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aplavin/32/222056_2.png) [@aplavin](https://discourse.julialang.org/u/aplavin)\
**Post date:** [December 4, 2019, 4:32pm UTC](https://discourse.julialang.org/t/switching-from-jupyter-to-a-proper-ide/31648/16 "2019-12-04T16:32:28Z")

</div>

> [@orialb](#):
>
> It sounds as if you really want/need to work with an interactive computational notebook, so why not just continuing working with a Jupyter notebook 🙂 ?

Yes, I really do want and need, but the reasons I’m trying to find something else are also outlined in the first post: jupyter really lacks in text editing capabilities - even auto indent often works incorrectly, and in debugging/code navigation.

---

<div class="post-metadata">

**Author:** ![ExpandingMan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/expandingman/32/866_2.png) [@ExpandingMan](https://discourse.julialang.org/u/ExpandingMan)\
**Post date:** [December 4, 2019, 4:46pm UTC](https://discourse.julialang.org/t/switching-from-jupyter-to-a-proper-ide/31648/17 "2019-12-04T16:46:41Z")

</div>

Sounds to me like what you want is just to do your work via `ssh` on a remote server, possibly in a docker container. It doesn’t really sound to me like anything you’re doing is unique to Jupyter (full disclosure: I despise Jupyter).

> [@aplavin](#):
>
> - The whole julia (and python - mostly used by pycall) setup is run in docker (for easy updates and reproducibility) on one fast machine, where all the data resides as well. Then from any place (2-3 other computers) I can easily use it without worrying about any kind of synchronization. These “other” computers don’t have all the libraries and packages installed, and don’t store my code - it’s located all in one place.
> - The very same layout between different computers - e.g. come home, open jupyter, and see exactly the same as you did at work.
> - No matter if the internet is fast or slow (think 3G-scale ping) it doesn’t affect typing and looking at previously-generated results and plots. Only the new outputs are slowed down (obviously). And even without internet connection I can see all previous outputs.
> - Permanent (until manually removed) display of code blocks and their corresponding results together.
> - Multiple independent julia sessions simultaneously, each with its own set of code blocks and results, easily switchable back and forth.

- Sounds like you want to run Julia in a docker container, you can do this anywhere, it has nothing to do with Jupyter.
- For vim and emacs at least, it is trivial to reproduce a setup, see for example [my nvim setup file](https://github.com/ExpandingMan/dotfiles/blob/master/.config/nvim/init.vim). I’d imagine that any IDE’s that are any good have a similarly easy to reproduce setup.
- This does seem like one area in which JupyterLab may have a slight advantage. You don’t typically need a ton of bandwidth for `ssh` but you do need some and if you have a bad connection lag can be frustrating.
- REPL output doesn’t disappear and even stores a history between sessions in `.julia/logs/repl_history.jl`.
- Nothing is stopping you from running arbitrarily many instances of Julia.

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [December 4, 2019, 11:47pm UTC](https://discourse.julialang.org/t/switching-from-jupyter-to-a-proper-ide/31648/18 "2019-12-04T23:47:02Z")

</div>

Maybe we could get [https://github.com/krassowski/jupyterlab-lsp](https://github.com/krassowski/jupyterlab-lsp) to work with [https://github.com/julia-vscode/LanguageServer.jl](https://github.com/julia-vscode/LanguageServer.jl)? Maybe that would make JupyterLab more usable?

---

<div class="post-metadata">

**Author:** ![orialb](https://avatars.discourse-cdn.com/v4/letter/o/65b543/32.png) [@orialb](https://discourse.julialang.org/u/orialb)\
**Post date:** [December 5, 2019, 2:17pm UTC](https://discourse.julialang.org/t/switching-from-jupyter-to-a-proper-ide/31648/19 "2019-12-05T14:17:22Z")

</div>

For me personally the fact that Jupyter lab capbilities are limited is actually a feature- it incentivizes me to refactor my code into more organized packages so I can work on it with a normal text editor, instead of keeping everything in huge messy notebooks 🙂 .

This jupyterlab-lsp looks cool in any case. For jumping to definition there is also this simpler [extension](https://github.com/krassowski/jupyterlab-go-to-definition) (from the same author of the lsp one) which seems to just work.

---

<div class="post-metadata">

**Author:** ![non-Jedi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/non-jedi/32/3645_2.png) [@non-Jedi](https://discourse.julialang.org/u/non-Jedi)\
**Post date:** [December 5, 2019, 3:08pm UTC](https://discourse.julialang.org/t/switching-from-jupyter-to-a-proper-ide/31648/20 "2019-12-05T15:08:53Z")

</div>

> [@orialb](#):
>
> for example using [emacs-jupyter](https://github.com/dzop/emacs-jupyter) + org-mode, not sure if plots can work inside a tmux session though

For what it’s worth, [emacs-jupyter has full support for remote kernels](https://github.com/dzop/emacs-jupyter#remote-kernels)–no tmux session necessary. What the op is requesting sounds like it would be perfectly served by emacs-jupyter + org-mode + tramp, but I’m hesitant to suggest jumping ship to emacs for this kind of setup because there are so many interconnected moving parts that getting it working reliably might be a bit fiddly for somebody new to the editor.

But @aplavin, for what it’s worth, emacs-jupyter + org-mode + tramp satisfies every single point in your original post.

[Next page](https://discourse.julialang.org/t/switching-from-jupyter-to-a-proper-ide/31648.md?page=2)
