You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deno is currently installing its Jupyter kernel config to a deprecated installation location on macOS (and probably other platforms). It should be checking the JUPYTER_PLATFORM_DIRS environment variable, and installing to the updated location when it is set to a truthy value.
Background
In version 5 of jupyter_core, Jupyter has moved to a platform-specific directory structure and has deprecated the old one. If you use jupyter libraries that depend on jupyter_core (e.g. jupyter_client, in my case), it'll spit out a deprecation warning unless you set JUPYTER_PLATFORM_DIRS=1 in your environment.
When you set JUPYTER_PLATFORM_DIRS=1, it switches over to use the new directory structure. If kernel configs aren't installed in those locations, jupyter_core can't find them.
How to reproduce
In the example below (running on macOS), you can see that I've mirrored my existing kernel installs over to the new directory structure:
(bburns@ben) 2025-02-06T12:10:22+1300 😁 ~/projects
λ jupyter kernelspec list
Available kernels:
sos /Users/bburns/Library/Jupyter/kernels/sos
python3 /Users/bburns/.pyenv/versions/3.11.11/share/jupyter/kernels/python3
(bburns@ben) 2025-02-06T12:10:30+1300 😁 ~/projects
λ JUPYTER_PLATFORM_DIRS=1 jupyter kernelspec list
Available kernels:
sos /Users/bburns/.local/share/jupyter/kernels/sos
python3 /Users/bburns/.pyenv/versions/3.11.11/share/jupyter/kernels/python3
When I install deno's kernel with the JUPYTER_PLATFORM_DIRS env var set, jupyter can't find it.
(bburns@ben) 2025-02-06T12:10:37+1300 😁 ~/projects
λ JUPYTER_PLATFORM_DIRS=1 deno jupyter --install
Warning "deno jupyter" is unstable and might change in the future.
✅ Deno kernelspec installed successfully.
(bburns@ben) 2025-02-06T12:10:53+1300 😁 ~/projects
λ JUPYTER_PLATFORM_DIRS=1 jupyter kernelspec list
Available kernels:
sos /Users/bburns/.local/share/jupyter/kernels/sos
python3 /Users/bburns/.pyenv/versions/3.11.11/share/jupyter/kernels/python3
However, if I drop back to the deprecated directory structure, it finds it in the old, deprecated location
(bburns@ben) 2025-02-06T12:10:58+1300 😁 ~/projects
λ jupyter kernelspec list
Available kernels:
deno /Users/bburns/Library/Jupyter/kernels/deno
sos /Users/bburns/Library/Jupyter/kernels/sos
python3 /Users/bburns/.pyenv/versions/3.11.11/share/jupyter/kernels/python3
How to fix
When the JUPYTER_PLATFORM_DIRS env var is set on macOS, deno kernel install should install to $HOME/Library/Application Support/Jupyter/kernels rather than $HOME/Library/Jupyter/kernels.
I believe the install target for other platforms has changed as well, but I'm not sure what the most universal target should be for those.
The text was updated successfully, but these errors were encountered:
Version: Deno 2.1.9
Problem
Deno is currently installing its Jupyter kernel config to a deprecated installation location on macOS (and probably other platforms). It should be checking the
JUPYTER_PLATFORM_DIRS
environment variable, and installing to the updated location when it is set to a truthy value.Background
In version 5 of
jupyter_core
, Jupyter has moved to a platform-specific directory structure and has deprecated the old one. If you use jupyter libraries that depend onjupyter_core
(e.g.jupyter_client
, in my case), it'll spit out a deprecation warning unless you setJUPYTER_PLATFORM_DIRS=1
in your environment.When you set
JUPYTER_PLATFORM_DIRS=1
, it switches over to use the new directory structure. If kernel configs aren't installed in those locations,jupyter_core
can't find them.How to reproduce
In the example below (running on macOS), you can see that I've mirrored my existing kernel installs over to the new directory structure:
When I install deno's kernel with the
JUPYTER_PLATFORM_DIRS
env var set, jupyter can't find it.However, if I drop back to the deprecated directory structure, it finds it in the old, deprecated location
(bburns@ben) 2025-02-06T12:10:58+1300 😁 ~/projects λ jupyter kernelspec list Available kernels: deno /Users/bburns/Library/Jupyter/kernels/deno sos /Users/bburns/Library/Jupyter/kernels/sos python3 /Users/bburns/.pyenv/versions/3.11.11/share/jupyter/kernels/python3
How to fix
When the
JUPYTER_PLATFORM_DIRS
env var is set on macOS,deno kernel install
should install to$HOME/Library/Application Support/Jupyter/kernels
rather than$HOME/Library/Jupyter/kernels
.I believe the install target for other platforms has changed as well, but I'm not sure what the most universal target should be for those.
The text was updated successfully, but these errors were encountered: