Reputation: 31
I have installed Julia (on Linux) at a location, say /a/b/c, along with IJulia, the kernel package required to make Julia show up on JupyterLab. I would like this to be for a multi-user mode (I understand they will not have ability to install/maintain packages)
When I set $HOME to /a/b/c, JupyterLab shows the Julia kernel and everything seems to work. This is not a viable solution for multiple reasons.
I tried a few different options, so far to no avail:
- Created a softlink: ln -s /a/b/c/.julia /home/guru/.julia
- Set env variable JULIA_PROJECT to /a/b/c/.julia then to /a/b/c/.julia/environments/v1.0/
- Also tried setting JULIA_PKGDIR but this seems to be obsolete anyway
What is the right way to have /a/b/c/.julia show up for everyone when they launch JupyterLab?
Upvotes: 2
Views: 2580
Reputation: 42214
I recommend adding Jupyter Lab to Julia via Conda.jl
and just using this added version.
using Conda
Conda.add("jupyterlab")
Now run from the console:
~/.julia/packages/Conda/hsaaN/deps/usr/bin/jupyter lab
There are many other options so comment if you need something different.
Upvotes: 0
Reputation: 5583
It seems that JupyterLab cannot find julia
command. Because it is not in your PATH
.
You can try the following command to create a link for your julia executable in a directory which is in PATH
. The usual directory to do that is /usr/local/bin
.
sudo ln -s /a/b/c/bin/julia /usr/local/bin/julia
This should work for all users. Note that /usr/local/bin
might not exist in some Linux distributions. If you have such a distribution, run echo $PATH
in Linux command line to see which directories are in path.
Another solution would be to add julia's bin
directory to PATH
for all users.
sudo echo "export PATH=$PATH:/a/b/c/bin" >> /etc/profile
I would go for the first solution.
Upvotes: 1
Reputation: 6086
Try the instructions here: it seems to require re-installing IJulia with the ENV["jupyter"] environment variable first set properly.
https://qiita.com/crowdy/items/d1e86df398ee97086d74
Upvotes: 0