2

I installed Julia but cannot run a notebook in Jupyter (XUbuntu 14.04). As soon as I start a new notebook, it connects with the kernel and then crashes:

enter image description here

enter image description here

enter image description here


There's 2 possible things that I can think of. First, I installed Julia like this:

$ sudo apt-add-repository ppa:staticfloat/julianightlies
$ sudo apt-add-repository ppa:staticfloat/julia-deps
$ sudo apt-get update
$ sudo apt-get install julia

and then:

julia> Pkg.add("IJulia")
julia> Pkg.build("IJulia")

when running $ jupyter notebook, it showed the messages above. I removed Julia and now I have version 0.4.6, which I can run perfectly from bash. It still crashes in Jupyter, though. And it still shows two versions of Julia:

enter image description here

(Python and R work just nice)


The second idea is, maybe it has something to do with being root? If I run

$ Julia
julia> using IJulia
ERROR: SystemError: opening file /home/luis/.julia/lib/v0.4/IJulia.ji: Permission denied
 in open at ./iostream.jl:90
 in open at iostream.jl:102
 in stale_cachefile at loading.jl:439
 in recompile_stale at loading.jl:474
 in _require_from_serialized at loading.jl:83
 in _require_from_serialized at ./loading.jl:109
 in require at ./loading.jl:235

If I run:

$ sudo Julia
julia> using IJulia

it throws no errors at all.


Any ideas what could be happening?

Note: I am aware of similar questions here, but they havn't worked for me...

Community
  • 1
  • 1
Luis
  • 3,327
  • 6
  • 35
  • 62
  • 1
    `/home/luis/.julia/lib/v0.4/IJulia.ji: Permission denied` - all the files in `/home/luis` should belong to your user and have at least user read permissions. I'd guess that `chown -R luis /home/luis/.julia` will solve this issue. – cel Jun 25 '16 at 12:08
  • @cel That did the trick, neat and directly. You mind to post it as an answer? – Luis Jun 25 '16 at 12:49

1 Answers1

6

This can happen when files in your home directory were created by root and thus do not belong to your user. Rule of thumb is here: everything in your home directory should to belong to your user account.

You can use chown to change ownership:

sudo chown -R luis /home/luis/.julia will recursively change the owner of all files in /home/luis/.julia to the user account luis.

cel
  • 30,017
  • 18
  • 97
  • 117