Problems when running Julia on JupyterLab

Hi.

I have still yet to find an IDE for Julia that works well on all platforms, JupyterLab included. In fact, I have to say that my experience with JupyterLab was one of the worst. I couldn’t really see the advantage of JupyterLab over Jupyter Notebooks, as I couldn’t get the REPL and editor (or REPL and Notebook) to display at the same time. It was worse than that, because I found that switching between editor and console took typically as long as 1 minute, with my browser asking me several times each time if I wanted to terminate the process that was slowing down everything. There is not even a button for ‘save’. I couldn’t see what JupyterLab is trying to achieve, but maybe it is just too early in the development. That said, I can’t say that it is looking promising.
I think I can see why there is little or no interest.

I am sorry to be so negative, and please don’t get me wrong - I think a browser-based notebook-compatible IDE for Julia would be wonderful. I just don’t think that JupyterLab is headed in a direction that gives me hope.

My opinion (FWIW!).

The first example in the documentation page Documents and Kernels — JupyterLab 4.0.9 documentation shows how to do this, or you can drag the tabs to subdivide your workspace as you like.

This is surprising. Do you have an example file and workflow? How large was the file or data displayed in the console?

For a file editor, there is a menu item (File > Save) and a keyboard shortcut (Ctrl/Cmd S). We don’t have a toolbar right now for file editors - is that what you are expecting?

Hi Jason,

Thanks for getting back to me.

Generally, when I am trying something new like this, I have a little play to see how intuitive and handy it is first, then read the docs if it looks promising.

In this case, I hit the ‘browser freeze’ issue almost immediately, with a very small example. I looked it up online and this seems to be an issue that goes back since the beginning JupyterLab and (obviously) still hasn’t been resolved. As others seems to experience, the longer I am logged in, the slower switching seems to get.

So I have to admit that I haven’t read the docs, though would say that with other IDE’s I have tried, I managed to get editor and REPL going on the same page without spending hours reading docs. That said, I will look at the instructions on the link (thanks!)

I wonder if it might be that I installed an early version of JL (how can I check this?). If so, is there any simple way I can be sure of installing the latest version (preferably without invoking conda or pip)?
Assume that my most serious issues are on Linux

Thanks for your help.

Update!! I tried to ‘right-click’ in the editor to get a console on my Linux machine but nothing opened up (e.g., no menu showed up like on the video)

Look in the Help > About JupyterLab menu entry. That shows the version of JupyterLab you are running. The current version is 2.1.2, IIRC.

I’ve seen browser freezing with very long notebooks with lots of cells, especially in older versions of JLab, but not with moderately sized text files (it seems you are mainly working with the editor?). Again, we’d love to see example files that freeze the UX to more clearly trace down the issues. Also it may be important what browser/version you are using.

I agree ideally a UX should be intuitive. VS Code uses a very similar sort of tab dragging to split panes that we do. Right-clicking on an editor or using the File menu to open a console connected to the editor automatically splits the pane. Would an editor toolbar button to implement the same thing (open a console in a split pane) have been more discoverable to you?

We did spend a lot of time to make the introductory docs extremely concise and helpful for common patterns, so you’d spend like 10-15 minutes rather than hours :).

We’re getting a bit off topic from the thread subject here. However:

If you have JupyterLab version 2 or later, would you mind opening a new issue in JupyterLab, and include your version of JupyterLab?

If you have an older version of JupyterLab (especially pre-1.0), we’d encourage you to update it. The official supported ways are with pip and conda-forge. However, you may be able to update it with your package manager - I’m not sure what you are using and what version they carry.

Hi Jason,

I’m sorry, but I had forgotten the other serious issue I had, which was on my Mac. When I open up my files in the editor nothing is visible - it is just blank.
This seems to be an ongoing issue as well. However, I did manage to do the ‘right-click’ thing on the Mac and it looks good, so if I can fix the ‘blank page’ issue, I can at least use JupyterLab on my Mac.

Any ideas about how to fix the ‘blank page’ issue?

Regarding my unix machine, I realised I was using an old ‘Beta’ version of JupyterLab, even though I had done a standard installation with
pip install jupyterlab
(I don’t know why it didn’t install the latest version and I could not get it to upgrade - it just says it is up to date).

Thanks again for your help!

I haven’t heard of this. Is there a JupyterLab issue already opened for this?

I usually explicitly request a version pip install jupyterlab=2.1.2 to make sure, or I think you can use --upgrade.

Hi. Thanks for the suggestions. Neither of those work. Unfortunately, my conda is totally broken (which is why I am using pip even though I heard you are not meant to mix - I have nothing to lose at this point!!)

As for the ‘blank screen’ issue, I typed ‘JupyterLab blank screen’ on Google and got pages and pages of hits, including

I think your trying to chase bugs is admirable, but might be a losing battle until they develop some standalone installation scripts for JupyterLab

These are about JupyterLab itself not showing up. Is that what is happening to you? I.e., you type “jupyter lab” and just a blank webpage shows up (no JLab ux, etc.)? In my experience, these are usually installation problems. The one you list is more about configuring JupyterHub to use JupyterLab rather than a problem in JupyterLab itself, which sounds like it is very different from your situation.

I thought you said you could open a file, which indicates you are seeing JupyterLab, but for some reason the editor doesn’t show text.

I’m a core JupyterLab developer :).

Given that you are having issues with your conda/python environment and it may be broken, I’m curious if using a fresh clean environment gives you a working JupyterLab 2.1.2.

Thanks. I haven’t used python in a long time and don’t remember many details about environments. I guess I have to set up a new environment reinstall python and conda, then try to install JL, and make sure I have activated the environment whenever I start JL. Isn’t that right? Seems like a very roundabout way just to get a Julia IDE running…I may stick with my clunky emacs shell for now and keep an eye on developments. Thanks, though!

If you are using conda, it may be as easy as:

conda create -n MyNewEnvironment -c conda-forge jupyterlab
conda activate MyNewEnvironment
jupyter lab

Hey, thanks - that worked - sort of. I managed to install JupyterLab 2.1 but the ‘right-click’ still doesn’t work in the editor, so I can’t get console on the same page as the editor. It does switch back and forth faster, though!
Is there any way to get the console and editor on the same page without using ‘right-click’? PS Tried both Firefox and Chrome - no ‘Right-click’
[Reminder: this is Ubuntu 18.04]

Hi Jason,

More bad news, I’m afraid. With the new (updated) version, ‘paste’ (CTRL-V) does not seem to work in the editor anymore, although it does in the console. This was not an issue in the earlier version before I upgraded.

Just to remind: This is on the Ubuntu machine: I cannot right-click and pasting does not work.

On my MAC I cannot see my files when I open them up in the editor - I just get what looks like empty files (although they run).

Seems like lots of bugs still – it can’t be only me.

I think I need to leave this. I’ll try again in 6 months and see if you have gotten further [I need to get back to work!]

It would be handy if it worked.

Thanks for trying. These are indeed puzzling, and I don’t remember hearing of these issues before (ctrl-v not working in the editor, not seeing the right-click menu, not seeing text content when opening a file). They seem pretty egregious and noticeable, so I’d be very surprised if they were widespread.

Sometimes people have posted about very odd behavior happening in older browsers, or browsers with extensions that changed the page structure. It’d be a great help if you could post:

  1. The browser and browser versions you are using
  2. What JupyterLab extensions you may have installed: jupyter labextension list
  3. Do you see any errors in the browser javascript console
  4. Do you see any errors in the server console (where you launched JupyterLab)

Edit: I see above you said you tried both Firefox and Chrome on Ubuntu 18.04 for the right-click. I assume the latest versions of those browsers?

Edit 2: And I understand if you don’t have time to try to debug this further. It’s just really puzzling to me the symptoms you are seeing, so whatever debugging information you can post will help narrow down if the problems are with your installation or with JLab itself.

That’s what I posted above about dragging the tabs (watch the first 16 second video at that link to see a demo of dragging tabs)

I am using Firefox 76

@compleathorseplayer, tell me, is the Jupyter runtime and editor running native on your Mac? That is, are you connecting to JupyterLab over 127.0.0.1?

– Rick

Yes, as localhost. I finally figured out the issue: using ‘WhiteListing’ ad-blockers (particularly mu-blocker) is not good enough - you have to fully disable them, it seems, for JL to work.

Thanks and sorry for not figuring this out sooner!

Glad it worked out for you, and I’m sorry I didn’t post a response sooner.

I’m really curious to see if this would be a problem on Cloud-hosted solutions, like our own, and I want to test it. Can you tell me the steps to reproduce and I’ll try it out on our free hub?

Or, for that matter, did you have this problem using JuliaBox?

Thanks
Rick