Hello everyone, I have installed julia (on ubuntu 20.04) and want to run it in notebook. For this I used:
But in the end it opens this:
[ Info: running `/usr/bin/snap notebook`
Process(setenv(`/usr/bin/snap notebook`; dir="/home/myname"), ProcessExited(64))
But the browser with the notebook does not open, as promised in the tutorials. Please tell me what am I doing wrong?
/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.
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
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.
Just my two cents to setup Julia in Linux.
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?
Yes, the file is not there by default and you can create it.
mkdir -p ~/.julia/config
echo 'ENV["PYTHON"] = ""' >> ~/.julia/config/startup.jl
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.
ENV["PYTHON"] = ""
# This line removes PyCall from Project.toml (a list of explicit dependencies)
When I enter Pkg.build(“PyCall”), an error occurs like this:
Error building `Conda`:
ERROR: LoadError: IOError: mkdir("/path"; mode=0o777): permission denied (EACCES)
@ ./libuv.jl:97 [inlined]
 mkdir(path::String; mode::UInt16)
@ Base.Filesystem ./file.jl:179
 mkpath(path::String; mode::UInt16)
@ Base.Filesystem ./file.jl:230
 mkpath(path::String; mode::UInt16) (repeats 2 times)
@ Base.Filesystem ./file.jl:228
@ Base.Filesystem ./file.jl:225
 top-level scope
@ Base.MainInclude ./client.jl:444
 top-level scope
tried running julia with sudo, didn’t help
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 don’t know. From what I have used they look similar, except for the reactivity. But I am not a heavy user, so I cannot speak about the details.
The last time I tried, it didn’t have PlutoUI and it probably will never have exactly PlutoUI, since that interface depends on the reactivity.
(see also https://github.com/compleathorseplayer/Neptune.jl/issues/21)
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.
About how to make Jupyter run.
Maybe it would be good to know a bit about the environment you are using.
- What is the output of
import Pkg; Pkg.status()
- Which Julia version are you using?
I myself had often some initial problems to get jupyter to run. Your error looks like something which might be solved in a newer Julia version.