IJulia status for v. 0.7/1.0 on Windows 10?

Anyone knows the status of IJulia for Julia v.0.7/1.0 under Windows 10? I know this is an Issue for the IJulia package, and there is still activity on this in the Julia Observer section.

I just updated Julia v.0.7 on my home computer (I’ve done this regularly), including IJulia with v.1.9.3 installed. IJulia starts up fine. When I open a notebook set with kernel Julia 0.7 and execute code 2*2, the notebook just hangs. If I interrupt and switches the kernel to Python 3.0, the response is instantaneous.

If I use Juno, that works fine.

For various reasons, I’ve used IJulia instead over Juno in the past, so I miss the possibility of test my past notebooks.

OK… IJulia: status on v.0.6.4 vs. v.0.7/1.0 on Windows 10:

  • Latest IJulia v. 1.10.0 works sometimes on my Windows 10 computers with Julia 0.7/1.0. Versions of IJulia prior to v. 1.10.0 didn’t work at all with Julia v.0.7/1.0.

  • In IJulia, both Julia 0.6.4 and Julia 0.7/1.0 (when it works) as kernels give sluggish response compared to the response with Python 3 as kernel.

  • Example: 1+1 is evaluated “immediately” when I use Python 3 as kernel. With Julia as kernel, the evaluation may take a couple (or more) of seconds the first time I evaluate a cell… faster with evaluation in follow-up cells.

So: I didn’t look into the performance of previous versions of IJulia (prior to v. 1.10.0) with kernels Python 3 vs. Julia 0.6.4. If the Julia kernel is slow for earliers versions of IJulia, does that indicate a slumbering problem/instability in the Julia-IJulia connection?

Did you check this issue yet?


(Since you didn’t link it.)

I personally couldn’t get any response from the notebook for 0.7/1.0 until I set

ENV["IJULIA_DEBUG"] = true

and tried this suggestion in the issue above.

Then it works for anything between 10 seconds to a minute or so; notebooks are basically unusable on Windows right now. It’s rather unfortunate, I ended up having to install a Linux distro just to get some working notebooks!

I’m not sure what you mean with sluggish response, the first cell always takes a little longer (some compilation going on, I’d guess). It is noticably worse than what you experience when running a notebook on JuliaBox?

Yes, I checked the discussion within the IJulia.jl GitHub page. Since I have virtually zero experience with GitHub (and no account), I couldn’t comment there.

I noticed that someone had had some success by changing the IJulia ENV, but I also saw that some well known developers within the Julia society indicated that all the tricks presented were not truly useful.

Anyway, on my two computers (Julia v.0.7.0 at home, Julia v.1.0 at work desktop), I don’t do anything wrt. changing the ENV… I simply issue command notebook() or notebook(detached=true) from the REPL. Prior to IJulia v. 1.10.0, nothing worked on these two. With IJulia v 1.10.0, I get response sometimes, but not always. At the same time: if I switch kernel to Python 3, I’ve never had problems, but as soon as I switch back to Julia kernel, the sluggishness and lack of response is back.

When IJulia works, the kernel status looks like this:
image
where the lower right bullet is a circle (howevering the cursor over the bullet shows “kernel idle”).

When IJulia doesn’t work, the bullet is filled, and howevering the cursor over it shows “kernel busy” – with no response.

Some people claim to have seen similar response with Python kernel; I have only seen it with a Julia kernel (v > 0.6.4).

My experience with Julia v.0.6.4 as kernel (on my private laptop) is that that has always worked with IJulia. But I still have a feeling that the response with Python kernel is much more snappy. I may be wrong, though.

Should hopefully be working now once you do a Pkg.update.

1 Like

Yes, IJulia seems to work now!! Thanks a lot!! One comment and one question:

  • Using Python 3 as kernel still gives much snappier response then when using Julia as kernel. Any reason why? (Since the overhead for calling Python is so low in Julia…)
  • Will Jupyter Lab work with IJulia now? If so, how to I download and start Julia Lab?

When you first start an IJulia session, many things are getting compiled the first time you call them, which is why Python can seem snappier for interactive use.

(IJulia does not call Python. Jupyter communicates with language kernels using ZMQ.)

JupyterLab has worked for some time now, so it should still work.

OK.

JupyterLab… how do I start it? Right now, I start Jupyter notebooks from the REPL by…

julia> using IJulia
julia> notebook()

What is the procedure for starting JupyterLab in the REPL?

Open your command prompt outside of the Julia REPL and type jupyter lab. Similarly, if you had wanted to start the notebook outside of the Julia REPL then type jupyter notebook. Though you do need Jupyter lab installed first.

Aha. So I…

  1. Install Jupyter Lab via Anaconda. (Assumingly for Python 3, and not Python 2??; > conda install jupyterlab, or conda install -c conda-forge jupyterlab or something?)
  2. Type jupyter lab in a command window of Windows 10 (e.g., the one for Python 3).

Questions:

  • Will then the Julia kernel automatically become available in the opened jupyter lab browser window?
  • If so (Julia automatically available), do I need IJulia at all, then?

If you do that then it sounds like you might be installing a second Conda distribution just to run jupyterlab, whereas there should already be one installed inside your .julia folder—that’s the one that gets called if you do IJulia.notebook()). Unfortunately there’s nothing built into IJulia to let you run jupyterlab through that Conda distribution yet. I’ve suggested it, something like IJulia.lab(), but haven’t gotten around to putting together a PR for it yet.

Jupyterlab uses the same notebook kernels, so if you have got notebooks working then the lab interface should work too :slight_smile:

If you want to use the default Conda.jl distribution to install JupyterLab:

using Conda
Conda.add("jupyterlab")

and then, to run it:

jupyter = joinpath(Conda.BINDIR, "jupyter")
run(`$jupyter lab`)
2 Likes

Ah. OK – I already have another Python installment (Python 2.7 + Python 3.x) on my computer, but I understand the logics of using the one provided with Julia.

OK: the two first statements are carried out in the Julia REPL, I assume. (using Conda, Conda.add(...)).

The two second commands (“to run it”) – are those also carried out in the Julia REPL? Do I have to issue these four commands every time I want to run JupyterLab?

Yes. Or you can use the first jupyter = ... command to find the path of Jupyter and then run it from an OS terminal if you want.

Do I have to issue these four commands every time I want to run JupyterLab?

You don’t need the Conda.add. But you need to run the jupyter lab command every time you want to launch JupyterLab. (Or just leave it running all the time in the background, and connect to it from your browser when desired.)

Hm… Is run a Julia command? Should I really use back-tick to enclose the “string” (or whatever it is)?

Neither use of back-tick or use of quotation works… if I do

run("$jupyter lab")

this leads to error message:

ERROR: MethodError: no method matching run(::String)
Closest candidates are:
  run(::Base.AbstractCmd, ::Any...; wait) at process.jl:668
Stacktrace:
 [1] top-level scope at none:0

OK. I see from the help system that it is, in fact, correct to use back ticks. However, I get an error message:

julia> jupyter = joinpath(Conda.BINDIR,"jupyter")
"C:\\Users\\user_name\.julia\\packages\\Conda\\m7vem\\deps\\usr\\Library\\bin\\jupyter"
julia> run(`$jupyter lab`)
ERROR: IOError: could not spawn `'C:\Users\user_name\.julia\packages\Conda\m7vem\deps\usr\Library\bin\jupyter' lab`: no such file or directory (ENOENT)
Stacktrace:
 [1] _jl_spawn(::String, ::Array{String,1}, ::Cmd, ::Tuple{RawFD,RawFD,RawFD}) at .\process.jl:370
 [2] (::getfield(Base, Symbol("##499#500")){Cmd})(::Tuple{RawFD,RawFD,RawFD}) at .\process.jl:512
 [3] setup_stdio(::getfield(Base, Symbol("##499#500")){Cmd}, ::Tuple{RawFD,RawFD,RawFD}) at .\process.jl:493
 [4] #_spawn#498(::Nothing, ::Function, ::Cmd, ::Tuple{RawFD,RawFD,RawFD}) at .\process.jl:511
 [5] _spawn at .\process.jl:507 [inlined]
 [6] #run#509(::Bool, ::Function, ::Cmd) at .\process.jl:669
 [7] run(::Cmd) at .\process.jl:668
 [8] top-level scope at none:0

Can you try

jupyterlab = joinpath(Conda.BINDIR, "jupyter") * "-lab"
run(`$jupyterlab`)
julia> jupyterlab = joinpath(Conda.BINDIR,"jupyter")*"-lab"
"C:\\Users\\user_name\\.julia\\packages\\Conda\\m7vem\\deps\\usr\\Library\\bin\\jupyter-lab"

julia> run(`$jupyterlab`)
ERROR: IOError: could not spawn `'C:\Users\user_name\.julia\packages\Conda\m7vem\deps\usr\Library\bin\jupyter-lab'`: no such file or directory (ENOENT)
Stacktrace:
 [1] _jl_spawn(::String, ::Array{String,1}, ::Cmd, ::Tuple{RawFD,RawFD,RawFD}) at .\process.jl:370
 [2] (::getfield(Base, Symbol("##499#500")){Cmd})(::Tuple{RawFD,RawFD,RawFD}) at .\process.jl:512
 [3] setup_stdio(::getfield(Base, Symbol("##499#500")){Cmd}, ::Tuple{RawFD,RawFD,RawFD}) at .\process.jl:493
 [4] #_spawn#498(::Nothing, ::Function, ::Cmd, ::Tuple{RawFD,RawFD,RawFD}) at .\process.jl:511
 [5] _spawn at .\process.jl:507 [inlined]
 [6] #run#509(::Bool, ::Function, ::Cmd) at .\process.jl:669
 [7] run(::Cmd) at .\process.jl:668
 [8] top-level scope at none:0

Similar error message?

And you did run

using Conda
Conda.add("jupyterlab")

?