Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to convert notebook to Markdown ("ModuleNotFoundError"; macOS) #2117

Open
perwin opened this issue Feb 23, 2024 · 0 comments
Open

Unable to convert notebook to Markdown ("ModuleNotFoundError"; macOS) #2117

perwin opened this issue Feb 23, 2024 · 0 comments

Comments

@perwin
Copy link

perwin commented Feb 23, 2024

I'm having a problem running nbconvert (at least when I try converting a Jupyter notebookk to markdown format). It has always worked just fine on my system, but when I tried using it a week ago (after not using it for several months), I get the following:

% jupyter nbconvert --to markdown pyimfit_emcee.ipynb
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.11/bin/jupyter-nbconvert", line 5, in
from nbconvert.nbconvertapp import main
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/nbconvert/nbconvertapp.py", line 193, in
class NbConvertApp(JupyterApp):
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/nbconvert/nbconvertapp.py", line 252, in NbConvertApp
Options include {get_export_names()}.
^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/nbconvert/exporters/base.py", line 145, in get_export_names
e = get_exporter(exporter_name)(config=config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/nbconvert/exporters/base.py", line 106, in get_exporter
exporter = items[0].load()
^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/importlib/metadata/init.py", line 202, in load
module = import_module(match.group('module'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/jupyter_contrib_nbextensions/init.py", line 5, in
import jupyter_nbextensions_configurator
File "/Library/Frameworks/Python.framework/Versions/3.11/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.handlers'

This is the setup:
System: MacBook Pro (15-inch, 2019), macOS 13.6.4
Python 3.11.4 (python.org install)

% jupyter --version
Selected Jupyter core packages...
IPython : 8.22.1
ipykernel : 6.29.2
ipywidgets : 8.1.2
jupyter_client : 8.6.0
jupyter_core : 5.7.1
jupyter_server : 2.12.5
jupyterlab : 4.1.2
nbclient : 0.9.0
nbconvert : 7.16.1
nbformat : 5.9.2
notebook : 7.1.0
qtconsole : 5.5.1
traitlets : 5.14.1

I can get the same file to convert properly on a different laptop, where the setup and versions are:

System: MacBook Pro (13-inch M1 Pro, 2021), macOS 13.6.2
Python 3.11.4 (python.org install)

% jupyter --version
Selected Jupyter core packages...
IPython : 8.16.1
ipykernel : 6.27.2
ipywidgets : 8.1.1
jupyter_client : 8.6.0
jupyter_core : 5.5.0
jupyter_server : 2.11.0
jupyterlab : 4.0.9
nbclient : 0.8.0
nbconvert : 7.9.2
nbformat : 5.9.2
notebook : 7.0.6
qtconsole : 5.4.0
traitlets : 5.8.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant