Closed surak closed 1 year ago
If I understand correctly, this will fail to load python modules, as the pythonpath/ld_library_path/whatever is set on the python which is currently running, while the jupyterlab interface is "external" to this running python instance.
You are correct, although it is not related to jupyterlab interface.
The Python code generated does not interact with the JupyterLab plugin. It modifies the environment variables contained in os.environ
. Child processes of the kernel will inherits these environment variables. The usefulness of this feature is fairly limited since it is not a Python API for the JupyterLab plugin, it's only the lmod api.
The jupyter-lmod interface has a button which shows the following:
If I understand correctly, this will fail to load python modules, as the pythonpath/ld_library_path/whatever is set on the python which is currently running, while the jupyterlab interface is "external" to this running python instance. I am not sure if I am writing in a confusing way, so I will give an example:
Ok, to reproduce:
Working example - using the sidebar interface
import gym
)Non-working example: using python code