I’m trying to start up my Jupyter Notebook (jupyter notebook
in command line, and I’m not using any environments) and keep getting this error:
Traceback (most recent call last):
File "/usr/local/bin/jupyter-notebook", line 5, in <module>
from notebook.notebookapp import main
File "/usr/local/lib/python3.9/site-packages/notebook/notebookapp.py", line 78, in <module>
from .services.kernels.kernelmanager import MappingKernelManager, AsyncMappingKernelManager
File "/usr/local/lib/python3.9/site-packages/notebook/services/kernels/kernelmanager.py", line 18, in <module>
from jupyter_client.session import Session
File "/usr/local/lib/python3.9/site-packages/jupyter_client/__init__.py", line 6, in <module>
from .asynchronous import AsyncKernelClient # noqa
File "/usr/local/lib/python3.9/site-packages/jupyter_client/asynchronous/__init__.py", line 1, in <module>
from .client import AsyncKernelClient # noqa
File "/usr/local/lib/python3.9/site-packages/jupyter_client/asynchronous/client.py", line 6, in <module>
from jupyter_client.channels import HBChannel
File "/usr/local/lib/python3.9/site-packages/jupyter_client/channels.py", line 15, in <module>
from .session import Session
File "/usr/local/lib/python3.9/site-packages/jupyter_client/session.py", line 52, in <module>
from jupyter_client.jsonutil import extract_dates
File "/usr/local/lib/python3.9/site-packages/jupyter_client/jsonutil.py", line 15, in <module>
from dateutil.parser import parse as _dateutil_parse # type: ignore
ModuleNotFoundError: No module named 'dateutil'
I have tried the following fixes, to no avail:
- Completely uninstall, then reinstally
jupyter
and related packages (including dependencies) - Check which python I have and what is pointing where (this error indicates I’m getting the error with my Python 3.9 installation)
- Run a test.py code which imports
dateutil
. It also cannot finddateutil
. - Install
dateutil
using pip. I still get the error even thoughpython-dateutil
shows up duringpip list
Any ideas as to what might be wrong? My suspicion is that I have a path somewhere that’s pointing to the wrong thing, which is why Python3 on my machine can’t find the dateutil
package.