Issue
I have a local Poetry .venv
with Jupyter already installed. I am trying to get IJulia to work with this Jupyter installation as opposed to installing it through Conda. But I am not having much success.
This is what I've tried so far:
$ poetry shell
$ julia
julia> ]
pkg> activate MyEnv
julia> ENV["JUPYTER"]=".venv/bin/jupyter"
julia> ]
pkg> add IJulia
julia> using IJulia
julia> notebook()
Then it still asks me if I want to install Jupyter with Conda. And I do not. What am I missing here?
Solution
I tested on Ubuntu running on WSL2 and the following works for me.
Have
poetry
alongjupyter
installedCheck that
whereis python
resolves to poetry Python installationStart Julia:
$ poetry shell $ julia
Run the following code:
using Pkg pyt = split(read(`whereis python`, String))[2] ENV["PYTHON"]=pyt; Pkg.build("PyCall") Pkg.build("IJulia")
Now you are done so you can do:
julia> ENV["JUPYTER_TOKEN"]="mysecret"; # Jupyter password julia> notebook(dir=".") [ Info: running `/home/ubuntu/.cache/pypoetry/virtualenvs/ubuntu-zk_aSFMD-py3.10/bin/jupyter notebook`
Here is my installation:
Answered By - Przemyslaw Szufel
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.