Issues using Julia kernel without a python/conda installatoin
See original GitHub issueI am trying to test out usage without an existing conda installation or the the python extension installed. cc @rchiodo
Environment data
- VS Code version: 1.53.0-insider
- Jupyter Extension version (available under the Extensions sidebar): 2020.12.414227025
- Python Extension version (available under the Extensions sidebar): N/A
- OS (Windows | Mac | Linux distro) and version: WIndows 10
- Python and/or Anaconda version: N/A
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): N/A
- Jupyter server running: Local
Expected behaviour
I expect to be able to create a Julia notebook without installation of conda or the python extension
Actual behaviour
It seems to ahve trouble connecting to the kernel in that case.
Steps to reproduce:
Minimal Setup: 0. Install the jupyter extension and no other extensions. Not even the Julia one, which should not be needed.
- Install Julia on your machine, in my case 1.5.3
- In the Juila REPL do an
] add IJulia
in julia or a] build IJulia
if you already had it installed. This would install the kernelspec as required.
In vscode:
- Do a
> Create New Jupyter Notebook
and then> Select Notebook Kernel
. to choose Julia 1.5.3. I didn’t have trouble finding it on my system.- The same thing happens if I open a preexsting notebook as well, I will give both logs.
- It seems to correctly appear in the lower right hand corner of the window.
- If I add in a some code and execute it, it says it is
Connecting to kernel: Julia 1.5.3
which is good. - But then it says “Timed out waiting to get a heartbeat from kernel process”.
Logs
Jupyter
in the Output
panel (View
→Output
, change the drop-down the upper-right of the Output
panel to Jupyter
)
User belongs to experiment group 'NativeNotebookEditor'
> ~\AppData\Local\Programs\Julia 1.5.3\bin\julia.exe -i --color=yes --project=@. ~\.julia\packages\IJulia\IDNmS\src\kernel.jl ~\AppData\Local\Temp\tmp-4504pUQHacw3pI8g.json
cwd: c:\Users\jlperla\Documents\GitHub\quantecon-notebooks-julia\getting_started_julia
Error 2021-01-12 10:39:12: Timed out waiting to get a heartbeat from kernel process.
Error 2021-01-12 10:39:12: Failed to connect raw kernel session: Error: Timed out waiting to get a heartbeat from kernel process.
Error 2021-01-12 10:39:12: failed to create INotebook in kernel [Error: Timed out waiting to get a heartbeat from kernel process.
at m.waitForHeartbeat (c:\Users\jlperla\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\out\client\extension.js:49:637256)]
Error 2021-01-12 10:39:12: DataScience Error [Error: Timed out waiting to get a heartbeat from kernel process.
at m.waitForHeartbeat (c:\Users\jlperla\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\out\client\extension.js:49:637256)]
A few things:
- The julia executable points at,
C:\users\jlperla\AppData\Local\Programs\Julia 1.5.3\bin\julia.exe
But I do find the whole linux~
thing a little fishy. But maybe that is just how you display it.
Similarly, the same sort of thing happens if I open a preexisting notebook. For example, I have one in c:\Users\jlperla\Documents\GitHub\quantecon-notebooks-julia\getting_started_julia
and when I try to run a cell within the kernel I get.
User belongs to experiment group 'NativeNotebookEditor'
> ~\AppData\Local\Programs\Julia 1.5.3\bin\julia.exe -i --color=yes --project=@. ~\.julia\packages\IJulia\IDNmS\src\kernel.jl ~\AppData\Local\Temp\tmp-4504pUQHacw3pI8g.json
cwd: c:\Users\jlperla\Documents\GitHub\quantecon-notebooks-julia\getting_started_julia
Error 2021-01-12 10:39:12: Timed out waiting to get a heartbeat from kernel process.
Error 2021-01-12 10:39:12: Failed to connect raw kernel session: Error: Timed out waiting to get a heartbeat from kernel process.
Error 2021-01-12 10:39:12: failed to create INotebook in kernel [Error: Timed out waiting to get a heartbeat from kernel process.
at m.waitForHeartbeat (c:\Users\jlperla\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\out\client\extension.js:49:637256)]
Error 2021-01-12 10:39:12: DataScience Error [Error: Timed out waiting to get a heartbeat from kernel process.
at m.waitForHeartbeat (c:\Users\jlperla\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\out\client\extension.js:49:637256)]
> ~\AppData\Local\Programs\Julia 1.5.3\bin\julia.exe -i --color=yes --project=@. ~\.julia\packages\IJulia\IDNmS\src\kernel.jl ~\AppData\Local\Temp\tmp-4504Q9TMI8Pz57Yl.json
cwd: c:\Users\jlperla\Documents\GitHub\quantecon-notebooks-julia\getting_started_julia
Error 2021-01-12 10:44:49: Timed out waiting to get a heartbeat from kernel process.
Error 2021-01-12 10:44:49: Failed to connect raw kernel session: Error: Timed out waiting to get a heartbeat from kernel process.
Error 2021-01-12 10:44:49: failed to create INotebook in kernel [Error: Timed out waiting to get a heartbeat from kernel process.
at m.waitForHeartbeat (c:\Users\jlperla\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\out\client\extension.js:49:637256)]
Error 2021-01-12 10:44:49: DataScience Error [Error: Timed out waiting to get a heartbeat from kernel process.
at m.waitForHeartbeat (c:\Users\jlperla\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\out\client\extension.js:49:637256)]
One thing I will point out is that if I convert over the text that it seems to be using for the kernel.jl
call, i.e.
~\AppData\Local\Programs\Julia 1.5.3\bin\julia.exe -i --color=yes --project=@. ~\.julia\packages\IJulia\IDNmS\src\kernel.jl ~\AppData\Local\Temp\tmp-4504pUQHacw3pI8g.json
That is, in powershell I run
PS C:\Users\jlperla\Documents\GitHub> julia.exe -i --color=yes --project=@. $HOME\.julia\packages\IJulia\IDNmS\src\kernel.jl $HOME\AppData\Local\Temp\tmp-274403HLuz4vgGiuM.json
Starting kernel event loops.
Then it seems to be working? But I had trouble due to the space in the path name, so didn’t do the $HOME thing there.
Is it possible that this is just a path escaping problem?
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (4 by maintainers)
Top GitHub Comments
@IanMatthewHuff All sounds great. For julia, the last LTS is the 1.05 (although they are talking about the upcoming release maybe being the new LTS) but the package system and binary distribution stuff has changed so radically since 1.0.5 that I think that testing on 1.5 or above is much more sane at this point. I am willing to bet that nobody stuck on the LTS is going to use this feature prior to a new LTS.
BTW, for testing out any changes to your user info on kernel problems, you might be able to replicate the exact issue that I saw by cloning https://github.com/QuantEcon/quantecon-notebooks-julia and then opening one of those notebooks inside of that folder (which picks up the
Project.toml
andManifest.toml
by going recursively up the directories). It probably will have the same problem I had, but might not. Regardless, you would need julia 1.4 or above.@jlperla Your comment on this is very relevant. It’s actually an issue that we are working on addressing now.
The crux of the issue is that ‘timeout’ error isn’t useful to the user, and it’s more of a catch-all chokepoint for any issues with a kernel failing to start. Even in just the Python world kernels can fail to start in a myriad of ways and now that we’re starting up other language kernels directly there are more options for failing kernels here. Were talking some about better options here, but as a stopgap in our next release I believe that we’re adding a warning message in the timeout case directing users to the advanced logging option so that they can at least see the output coming in.
Regarding the Julia version I believe that I had 1.0.5 as it was listed as the LTS version on the Julia site. Does look pretty old though so I’ll look at installing the newest stable as well. I think that for our testing we’re actually using the newest stable, LTS was just what I happened to have installed.