Closed szazs89 closed 1 year ago
If I remove/rename the folder /opt/julia/local
then julia discards to search it, and tries to use ~/.julia
. (I.e. each project has to setup it correctly -- e.g. from a terminal julia > Pkg.add("IJulia")
, etc. -- if they need julia. That's how I had used it before the new image was installed.)
The way to add and use globally installed packages:
docker exec -it cocalc bash
# now we are root
umask 0022
JULIA_DEPOT_PATH=/opt/julia/local/share/julia julia
pkg> add PyCall SymPy
pkg> precompile
pkg> build
pkg> add LaTeXStrings Printf Plots PyPlot #etc.
pkg> st
pkg> update #etc.
Now, in a user termina of a cocalc sessionl run julia
and check the packages:
pkg> st
If something is not OK, try to remove .julia
directory. (Basically, it should contain a log
directory, only.)
Thanks!
It would be good to add instructions like this somewere in the docs https://github.com/sagemathinc/cocalc-docker/tree/master/docs e.g., about how to add packages for each language.
I have recently updated the docker image (ID:039bb42cee78, 2022-07-06), and tried to add some packages (SymPy, Plots) to it, but it fails with
no permission
. Afterdocker exec -it cocalc bash
, I could add those packages (as root), but now from a regular project I get:The same happens when trying
Pkg.instantiate()
from an.ipynb
.I don't know why it searches the path
/opt/julia/local/...
and not~/.julia/...
.Is it a bug or I have missed sg.?