Prevent jupyter server from searching Python modules in SWAN_HOME
We replace -s by -I as option to python. -I is both -s and -E, and -E means that no PYTHON* variable will be inherited by the new process (the Jupyter server). It also prevents the current directory to be included in the search path. The latter helps us prevent problems when the user has some module in SWAN_HOME that can interfere with the Jupyter server. Since we now do -I, no setting of the PYTHONPATH in systemuser.sh will have any effect on the Jupyter server. Anyway, the setting we did to include the Dask libraries in the PYTHONPATH was sterile, because the SwanDask extension wraps the Dask lab extension and uses the environment of the Python3 kernel for it, which already includes the Dask library dir. This is why we remove the aforementioned setting.
Loading
Please register or sign in to comment