Pythonpath and pip install of a library

Hello!

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

From the command line it works:
/usr/bin/python3
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/my_env.py:

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