After installing tljh via:
curl -L https://tljh.jupyter.org/bootstrap.py \
| sudo python3 - \
--admin admin:PASSWORD
my jupyter notebooks all use python 3.9, even though my system python was 3.10 and it looks like 3.10 is also used by the hub:
$ python3 --version
Python 3.10.4
$ ls /opt/tljh/hub/lib/
python3.10
$ source /opt/tljh/user/bin/activate
(base) $ python3 --version
Python 3.9.7
How can I make the jupyter notebooks use 3.10 or even my system python directly?
Using my system python would make things easier as I managed to install all the packages I need successfully there.
I tried following the steps in the official documentation, as well as the fixes suggested here, but both give me errors.
Background:
More specifically, I am trying to set up a jupyterhub for meep and mpb with:
conda install -c conda-forge pymeep pymeep-extras
# or for tljh:
# sudo env PATH=${PATH} conda install -c conda-forge pymeep pymeep-extras
This command works for me in a miniconda install, but not in the tljh jupyter notebooks.
Or rather, it seems to work, but the following essential imports then fail in python scripts:
import h5py
from meep import mpb
They fail with:
>>> import h5py
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/tljh/user/lib/python3.9/site-packages/h5py/__init__.py", line 33, in <module>
from . import version
File "/opt/tljh/user/lib/python3.9/site-packages/h5py/version.py", line 15, in <module>
from . import h5 as _h5
File "h5py/h5.pyx", line 1, in init h5py.h5
ImportError: /opt/tljh/user/lib/python3.9/site-packages/h5py/defs.cpython-39-x86_64-linux-gnu.so: undefined symbol: H5Pget_fapl_direct
>>> from meep import mpb
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/tljh/user/lib/python3.9/site-packages/meep/mpb/__init__.py", line 355, in <module>
from .solver import (
File "/opt/tljh/user/lib/python3.9/site-packages/meep/mpb/solver.py", line 10, in <module>
import h5py
File "/opt/tljh/user/lib/python3.9/site-packages/h5py/__init__.py", line 33, in <module>
from . import version
File "/opt/tljh/user/lib/python3.9/site-packages/h5py/version.py", line 15, in <module>
from . import h5 as _h5
File "h5py/h5.pyx", line 1, in init h5py.h5
ImportError: /opt/tljh/user/lib/python3.9/site-packages/h5py/defs.cpython-39-x86_64-linux-gnu.so: undefined symbol: H5Pget_fapl_direct
In my miniconda install, it works fine.