I had no problem running jupyter nbconvert from the command line with Python 3.10.2. I installed Python 3.11.4 (through pyenv) and now I get the following error message:
Traceback (most recent call last):
File “/Users/limsico/.pyenv/versions/3.11.4/bin/jupyter-nbconvert”, line 5, in
from nbconvert.nbconvertapp import main
File “/Users/limsico/.pyenv/versions/3.11.4/lib/python3.11/site-packages/nbconvert/nbconvertapp.py”, line 186, in
class NbConvertApp(JupyterApp):
File “/Users/limsico/.pyenv/versions/3.11.4/lib/python3.11/site-packages/nbconvert/nbconvertapp.py”, line 245, in NbConvertApp
Options include {get_export_names()}.
^^^^^^^^^^^^^^^^^^
File “/Users/limsico/.pyenv/versions/3.11.4/lib/python3.11/site-packages/nbconvert/exporters/base.py”, line 151, in get_export_names
e = get_exporter(exporter_name)(config=config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/Users/limsico/.pyenv/versions/3.11.4/lib/python3.11/site-packages/nbconvert/exporters/base.py”, line 110, in get_exporter
exporter = items[0].load()
^^^^^^^^^^^^^^^
File “/Users/limsico/.pyenv/versions/3.11.4/lib/python3.11/importlib/metadata/init.py”, line 202, in load
module = import_module(match.group(‘module’))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/Users/limsico/.pyenv/versions/3.11.4/lib/python3.11/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/Users/limsico/.pyenv/versions/3.11.4/lib/python3.11/site-packages/jupyter_contrib_nbextensions/init.py”, line 5, in
import jupyter_nbextensions_configurator
File “/Users/limsico/.pyenv/versions/3.11.4/lib/python3.11/site-packages/jupyter_nbextensions_configurator/init.py”, line 18, in
from notebook.base.handlers import APIHandler, IPythonHandler
ModuleNotFoundError: No module named ‘notebook.base’
jupyter --version gives me:
Selected Jupyter core packages…
IPython : 8.14.0
ipykernel : 6.25.1
ipywidgets : 8.1.0
jupyter_client : 8.3.0
jupyter_core : 5.3.1
jupyter_server : 2.7.1
jupyterlab : 4.0.5
nbclient : 0.8.0
nbconvert : 7.7.4
nbformat : 5.9.2
notebook : 7.0.2
qtconsole : 5.4.3
traitlets : 5.9.0
I’ve reinstalled ipython, notebook, jupyterlab and nbconvert (through pip) and I still get the same error message. When I switch back to Python 3.10.2, everything works fine again.
Any help would be appreciated!