Pythonpath and pip install of a library


I have a package that I need to point to with PYTHONPATH and a module that needs to be installed from using pip.

From the command line it works:
Python 3.10.6 (main, May 29 2023, 11:10:38) [GCC 11.3.0] on linux

Type “help”, “copyright”, “credits” or “license” for more information.

import vola

import pyvolar

However, when I am logged into the notebook, I am unable to access this installed module.

How have you set PYTHONPATH for users?

You can add it to c.Spawner.environment in /opt/tljh/config/jupyterhub_config.d/

c.Spawner.environment.update({"PYTHONPATH": "whatever"})