Hi!
I see in the documentation
<https://wikitech.wikimedia.org/wiki/PAWS/Python_with_Pip> that it is
possible to install additional Python libraries in PAWS using pip like so:
import sys
!{sys.executable} -m pip install [PACKAGE]
I see libraries are installed to /srv/paws/lib/python3.12/site-packages. I
assume this is not shared across PAWS users. By the way, does this count
toward the 5 GB storage available?
Is there a recommended way to create and use Python virtual environments in
PAWS notebooks? I think that would make it easier to identify which
packages and dependencies have been installed for which notebooks, and to
remove them when no longer needed.
The procedure I use for my local notebooks is the following (as explained
here <https://ipython.readthedocs.io/en/8.21.0/install/kernel_install.html>),
but I'm not sure this would be appropriate for PAWS JupyterLab setup:
1. Create a virtual environment: python -m venv venv
2. Activate the virtual environment: source venv/bin/activate
3. Install ipykernel on the virtual environment: pip install ipykernel
4. Configure the virtual environment's ipykernel into user's Jupyter
configuration: python -m ipykernel install --user --name=venv-name
_______________________________________________
Cloud mailing list -- [email protected]
List information:
https://lists.wikimedia.org/postorius/lists/cloud.lists.wikimedia.org/