Documentation: import opal error for jupyter notebooks
The jupyter notebooks (e.g. http://amas.web.psi.ch/docs/pyOPALTools/Cyclotron.html) have import errors:
from opal.opal import load_dataset, filetype
ds = load_dataset('./../../tests/testData/', ftype=filetype.TRACK_ORBIT)
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-1-2f139e8985fc> in <module>
----> 1 from opal.opal import load_dataset, filetype
ModuleNotFoundError: No module named 'opal'
The jupyter notebooks are generated by nbsphinx, but this doesn't copy the sys.path from sphinx, but only the environment variables, so the PYTHONPATH should be set in the main script conf.py
. See also the documentation: https://nbsphinx.readthedocs.io/en/0.7.0/configuring-kernels.html#Environment-Variables
Edited by snuverink_j