-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues using Julia kernel without a python/conda installatoin #4353
Comments
@jlperla Thanks for reporting this. We have added in some CI tests that I believe should have been covering this scenario (operating without the Python extension and without a python install) so I'm not fully sure what is happening here. I'll have to try to get a machine up to investigate. Out of interest could you share the contents of that Julia kernelspec file? That should be what we are pulling that kernel launch info from. |
Hi @IanMatthewHuff I think it might be: {
"display_name": "Julia 1.5.3",
"argv": [
"C:\\Users\\jlperla\\AppData\\Local\\Programs\\Julia 1.5.3\\bin\\julia.exe",
"-i",
"--color=yes",
"--project=@.",
"C:\\Users\\jlperla\\.julia\\packages\\IJulia\\IDNmS\\src\\kernel.jl",
"{connection_file}"
],
"language": "julia",
"env": {},
"interrupt_mode": "message"
} But that is the one I found by doing the |
Could you try one thing quick? On my Julia install the kernel startup time can be really slow. Could you try bumping up the value in the setting Jupyter: Jupyter Launch Timeout. We should rename that now that it's not starting a server most of the time, but we apply that same timeout value to getting the kernel startup up and waiting for a heartbeat from it. |
The old settings where:
I changed my settings to be: {
"julia.enableTelemetry": true,
"jupyter.insidersChannel": "weekly",
"workbench.editorAssociations": [
{
"viewType": "jupyter-notebook",
"filenamePattern": "*.ipynb"
}
],
"jupyter.alwaysTrustNotebooks": true,
"notebook.kernelProviderAssociations": [
{
"viewType": "jupyter-notebook",
"kernelProvider": "ms-toolsai.jupyter"
}
],
"jupyter.jupyterLaunchTimeout": 120000,
"jupyter.jupyterLaunchRetries": 10
} But no luck.: 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-4252yxX9Bn2IXDo3.json
cwd: c:\Users\jlperla\Documents\GitHub\quantecon-notebooks-julia\getting_started_julia
Error 2021-01-13 13:53:16: Timed out waiting to get a heartbeat from kernel process.
Error 2021-01-13 13:53:16: Failed to connect raw kernel session: Error: Timed out waiting to get a heartbeat from kernel process.
Error 2021-01-13 13:53:16: 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-13 13:53:16: 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)] I tried to change from the Is there a way to see the exact string that would be executed on my system to launch the kernel" I don't think the
Can't be exactly it since the Part of this may be that I can't see what the julia kernel call is actually returning. Is there a way to pass a commandline argument to the kernel to have it pipe to a file? Can I edit that kernelspec file to add another argv, for example? I tried the following, but it didn't end up working {
"display_name": "Julia 1.5.3",
"argv": [
"C:\\Users\\jlperla\\AppData\\Local\\Programs\\Julia 1.5.3\\bin\\julia.exe",
"-i",
"--color=yes",
"--project=@.",
"C:\\Users\\jlperla\\.julia\\packages\\IJulia\\IDNmS\\src\\kernel.jl",
"{connection_file}",
"> C:\\Users\\jlperla\\out.txt"
],
"language": "julia",
"env": {},
"interrupt_mode": "message"
} leading to
|
@jlperla I just realized, I'm looking this over again and I'm not seeing as much in the output as I was expecting. Between the errors I'd expect to see output from the kernel starting. I think that I might have forgotten to ask about turning on full output. In VS Code settings could you please check and see if the Jupyter: Logging > Level is set to 'debug'? That might surface any errors coming from stdout of the kernel. I'm normally on Mac, but I have a personal Windows PC as well, and I had Julia + kernelspec installed on there from earlier testing. Then I disabled all extensions expect for the Julia one. That scenario did work for me, and I see the ~ in the path so I don't believe that would be the issue here. |
That is what i needed, thank. A few quick points first and then the resolution:
Now for this particular bug, the debug output helps track things down. The summary:
The solution if anyone runs into this: delete your manifest, create a new manifest or project file with the packagse you want, and ensure the IJulia is updated in your main enviornment. @IanMatthewHuff On your side, I think the only thing to consider is whether you want to distinguish between the julia process returing with an error on hte launching of the kernel (which I think it probalby did, but not sure?) vs. saying there is a heartbeat error. Not sure, but otherwise I think it is just a question of ensuring that the errors percolate to the user better if possible. The full debug log is:
|
@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. |
@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 |
I am trying to test out usage without an existing conda installation or the the python extension installed. cc @rchiodo
Environment data
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.
] add IJulia
in julia or a] build IJulia
if you already had it installed. This would install the kernelspec as required.In vscode:
> 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.Connecting to kernel: Julia 1.5.3
which is good.Logs
Jupyter
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toJupyter
)A few things:
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.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.That is, in powershell I run
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?
The text was updated successfully, but these errors were encountered: