Hello
I am not sure if this is the intended behavior but root has taken over my conda/jupyter. I cannot anymore use jupyter (launching a session using “jupyter notebook”) unless I stop sourcing the root settings (source /Applications/root/bin/thisroot.sh). If I source the thisroot.sh file and I try to launch a jupyter notebook I get an error message:
File "opt/anaconda3/lib/python3.8/site-packages/jupyter_core/migrate.py", line 247, in migrate
with open(os.path.join(env['jupyter_config'], 'migrated'), 'w') as f:
PermissionError: [Errno 13] Permission denied: '/Applications/root/etc/notebook/migrated'
I think the problem is that root sets two variables JUPYTER_PATH and JUPYTER_CONFIG_DIR
I would like to know if it is possible to have root (which I use for my research) and conda/jupyter (for my teaching) to coexists.
Hi,
yes if you install ROOT via conda, Jupyter is also supposed to work.
@Angela, I see Jupyter is installed in a conda environment. How did you install ROOT?
I think with your setup, it’s correct to only source thisroot.sh when you need to use ROOT.
However, if you also install ROOT as a conda package (possibly in a separate conda environment than the software stack you need for teaching, if they conflict) you won’t need to source thisroot.sh at all and things should work together more smoothly.
The error seems indeed related to the setting of JUPYTER_PATH, which points to
/Applications/root/etc/notebook/
and Jupyter is trying to modify
'/Applications/root/etc/notebook/migrated'
for which your user doesn’t have permissions.
In order not to have this conflict, you can install ROOT via conda too, so that you use conda Jupyter and conda ROOT. No JUPYTER_PATH will be set in this case.
Thank you so much for your help. Indeed I was installing root in the old way (using the macOS package). I removed the old installation and installed root via conda and now both root and jupyter are working. I have one more question/curiosity, I am not really familiar with conda environments and PyROOT. If activate the root environment, how will it differ from the base environment besides the obvious addition of PyROOT?
thank you
Each conda environment contains a separate, independent set of packages. You could even have two different python versions in two different environments. Or different ROOT versions. The “base” environment is just the default environment that’s there when you install conda, and typically will contain a few “default” packages (and you can add more). Other environments that you create contain exactly just the packages that you specify (and their dependencies).