jupyterlab-hub
jupyterlab-hub copied to clipboard
Creating Files in Python Installation Directory
I'm running Python 3 on a cluster and just installed JupyterLab with JupyterLab Hub.
After installation I notice that there are quite a lot of files written into `which python3`/../share/jupyter/hub. How can I change that? We want to keep the core Python 3 folder clean of any package.
I hope the bug report fits here and not to jupyterlab
.
Hi @AndiH, you could install it using --user
, sending those files to ~/.local
.
Thanks for the swift response! Is there a --prefix
as well?
I meant the pip
command, pip install --user
: https://pip.pypa.io/en/stable/user_guide/#user-installs
Oh, I was quite unspecific in my original report. Sorry about that.
When I install jupyterlab
, I indeed use --prefix
:
pip3 install --prefix /opt/python/modules/3.6/jupyterlab/0.31.8 "jupyterlab==0.31.8"
But, after adding above's directory to the proper environment variables, running jupyter serverextension enable --py jupyterlab --sys-prefix
and jupyter labextension install @jupyterlab/hub-extension
creates the additional files, as far as I understand. My feeling was that only after the second command, files appear in `which python3`/../share/jupyter/hub/.
Ah, right, we are using data_files
to supply the static files that are used by the application, which are stored in sys-prefix/share/jupyter/lab
.
So if I choose jupyter serverextension enable --py jupyterlab --sys-prefix=something
that will go into something
?
(Disclaimer: I know nothing about Jupyter's backend stuff)
No, this is part of the installation of jupyterlab itself.
Well, you are correct in that enabling to --sys-prefix
affects the jupyter config in that directory.
But those share
files are part of the install itself.
That means even with pip3 install jupyterlab --prefix=something
, some files will land in $(which python3)/../share/jupyter/hub/
?
Or do I have a chance to change that?
Yes, that is the behavior of data_files
, I don't think there is a way to override that behavior.
Ok, that's bad. I am usually not allowed into that directory with my user and needed to request explicit write access.
@AndiH @blink1073 I figured I'd try triage some issues/prs in this repo.
Should we attempt to become actionable about this or leave it as is?
@consideRatio I still think this is very worthwhile to change. IMHO one can not expect to have access to a whole Linux box/root access. The app should be able to run self-contained from a dedicated folder structure.
That being said, right now I have not a lot of time to spare on this.