The most common cause of Jupyter stopping working is conflicts with user-installed python packages.
The ASU Supercomputers offers a python-environment manager, mamba, which can help alleviate these issues by keeping python packages properly contained.
This page describes the inner-workings of installing packages via various python methods and the impacts it may have.
Background about Python Libraries Locations
...
Environment Activated? | Installer | Command | Default Install Location | Note |
---|---|---|---|---|
No mamba/no env | pip | pip install package_name | /usr/local/lib/pythonX.X/site-packages | This location is not user-writable, so python may default to installing to your $HOME. Avoid this route. |
pip (with --user) | pip (with --user) | pip install --user package_name | ~/.local/lib/pythonX.X/site-packages | This location is user-writable, but installs packages in a location Jupyter Notebook/Lab uses on the Web Portal. Avoid this route. |
source activate YYYY | mamba | mamba install package_name | ~/.conda/envs/<envname>/lib/pythonX.X/site-packages | This location is user-writable and will be installed properly via mambas safeguards. PREFERRED route. |
source activate YYYY | pip | pip install package_name | ~/.conda/envs/<envname>/lib/pythonX.X/site-packages | This location is user-writable and will be installed properly via mambas safeguards. This is an ACCEPTABLE route for packages that cannot be installed via mamba. |
source activate YYYY | pip (with --user) | pip install --user package_name | ~/.local/lib/pythonX.X/site-packages | This location is user-writable, but installs packages in a location Jupyter Notebook/Lab uses on the Web Portal. Avoid this route. |
...