I tried to add export PYTHONPATH in the .bashrc file, but the jupyter note book still tend to find the kernel in the old PATH.
The pythonpath:
root@LAPTOP-TMUKND11:~# echo $PYTHONPATH
/home/cadabra2/jupyterkernel/cadabra2_jupyter
This is the error I got:
[I 16:25:49.692 NotebookApp] Kernel started: a100fde1-56b6-44ac-a95c-9cf2c6508e3c, name: cadabra2
/usr/bin/python3.10: No module named cadabra2_jupyter
[I 16:25:52.682 NotebookApp] KernelRestarter: restarting kernel (1/5), new random ports
/usr/bin/python3.10: No module named cadabra2_jupyter
[I 16:25:55.701 NotebookApp] KernelRestarter: restarting kernel (2/5), new random ports
/usr/bin/python3.10: No module named cadabra2_jupyter
[I 16:25:58.720 NotebookApp] KernelRestarter: restarting kernel (3/5), new random ports
/usr/bin/python3.10: No module named cadabra2_jupyter
[I 16:26:01.738 NotebookApp] KernelRestarter: restarting kernel (4/5), new random ports
/usr/bin/python3.10: No module named cadabra2_jupyter
[I 16:26:04.757 NotebookApp] KernelRestarter: restarting kernel (5/5), new random ports
/usr/bin/python3.10: No module named cadabra2_jupyter
[W 16:26:07.775 NotebookApp] KernelRestarter: restart failed
[W 16:26:07.775 NotebookApp] Kernel a100fde1-56b6-44ac-a95c-9cf2c6508e3c died, removing from map.