I saw /usr/bin/snap. Did you install Julia via snap (or Ubuntu store)?
Rather than installing Julia from the store, it is recommended to download, extract, and run Julia binary via the official website. Or you could try a CLI installer like jill.py.
Because IJulia.jl uses PyCall.jl (the package calling Python from Julia), by default it uses the system python (/usr/bin/python ) to install jupyter-notebook packages, which may or may not succeed.
The most frictionless way I tried is to force Julia to use its own miniconda distribution by setting the environment variable ENV["PYTHON"] = "" and re-run Pkg.build("PyCall") .
I usually set this line (ENV["PYTHON"] = "") at the start-up file ~/.julia/config/startup.jl to ensure Julia uses its own miniconda each time.
Thanks for the answer, installed julia again according to your instructions. I have a question: is it normal that I do not have such a file in the ~/.julia/config/startup.jl directory? That is, I can just create this file and continue to work with it?
When I start Pkg.build(“PyCall”) it writes that *PyCall (not found in project or manifest). Could it be because PyCall is using the wrong virtualenv?
I forgot to mention that Julia packages need to be added explicitly to use them. (Even PyCall.jl is a dependency of IJulia.jl) We can add the package temporarily if you don’t want to clutter the base environment.
You could try the following commands in the Julia REPL.
using Pkg
ENV["PYTHON"] = ""
Pkg.add(["PyCall", "IJulia"])
Pkg.build("PyCall")
Pkg.build("IJulia")
using IJulia
notebook()
# This line removes PyCall from Project.toml (a list of explicit dependencies)
Pkg.remove("PyCall")
Not trying to really solve your problem, but if you are not bound specificaly to Jupyter, I would suggest trying Neptune and/or Pluto, which do not have all those error-prone dependencies (and are better, IMO).
Using DOS, but after adding IJulia I run jupyter notebook from DOS and it works, although you have to choose to start a Julia kernel rather than a python one. I assume you already have python.
I found Pluto devilish when trying to switch Plots backends. But I think that was due to reactivity. If Neptune has Pluto’s good features, like easy HTML grabbing, without the annoying reactivity, I’ll try it. Does Neptune use PlutoUI, since that’s the handiest part of Pluto?
I just found that out. I used PlutoUI. But then I tried binding a variable to a slider. The slider worked but the variable didn’t move. I guess you can’t have everything Maybe I’ll just try to see why backend switching in Plots seems to make Pluto choke. Or just go back to tried and true Jupyter.