Problem with nbcovert template_paths and markdown template

I don’t know what changed, but I am getting an error when trying to convert a jupyter notebook to markdown. I do this all the time and it just broke in the last couple of days.

Here is my command:

jupyter-nbconvert class_03_rotation_matrices_part_3_and_ht_matrices_slides.ipynb --to markdown

And here is my trace back:

kraussryW1K36C:class_03_rot_mat_2_and_intro_to_ht kraussry$ jupyter-nbconvert class_03_rotation_matrices_part_3_and_ht_matrices_slides.ipynb --to markdown
Traceback (most recent call last):
File “/opt/homebrew/lib/python3.13/site-packages/traitlets/traitlets.py”, line 632, in get
value = obj._trait_values[self.name]
~~~~~~~~~~~~~~~~~^^^^^^^^^^^
KeyError: ‘template_paths’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/opt/homebrew/bin/jupyter-nbconvert”, line 8, in
sys.exit(main())
~~~~^^
File “/opt/homebrew/lib/python3.13/site-packages/jupyter_core/application.py”, line 283, in launch_instance
super().launch_instance(argv=argv, **kwargs)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File “/opt/homebrew/lib/python3.13/site-packages/traitlets/config/application.py”, line 1075, in launch_instance
app.start()
~~~~~~~~~^^
File “/opt/homebrew/lib/python3.13/site-packages/nbconvert/nbconvertapp.py”, line 420, in start
self.convert_notebooks()
~~~~~~~~~~~~~~~~~~~~~~^^
File “/opt/homebrew/lib/python3.13/site-packages/nbconvert/nbconvertapp.py”, line 585, in convert_notebooks
cls = get_exporter(self.export_format)
File “/opt/homebrew/lib/python3.13/site-packages/nbconvert/exporters/base.py”, line 107, in get_exporter
if getattr(exporter(config=config), “enabled”, True):
~~~~~~~~^^^^^^^^^^^^^^^
File “/opt/homebrew/lib/python3.13/site-packages/nbconvert/exporters/templateexporter.py”, line 354, in init
super().init(config=config, **kw)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File “/opt/homebrew/lib/python3.13/site-packages/nbconvert/exporters/exporter.py”, line 123, in init
self._init_preprocessors()
~~~~~~~~~~~~~~~~~~~~~~~~^^
File “/opt/homebrew/lib/python3.13/site-packages/nbconvert/exporters/templateexporter.py”, line 540, in _init_preprocessors
conf = self._get_conf()
File “/opt/homebrew/lib/python3.13/site-packages/nbconvert/exporters/templateexporter.py”, line 558, in _get_conf
for path in map(Path, self.template_paths):
^^^^^^^^^^^^^^^^^^^
File “/opt/homebrew/lib/python3.13/site-packages/traitlets/traitlets.py”, line 687, in get
return t.cast(G, self.get(obj, cls)) # the G should encode the Optional
~~~~~~~~^^^^^^^^^^
File “/opt/homebrew/lib/python3.13/site-packages/traitlets/traitlets.py”, line 635, in get
default = obj.trait_defaults(self.name)
File “/opt/homebrew/lib/python3.13/site-packages/traitlets/traitlets.py”, line 1897, in trait_defaults
return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self))
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File “/opt/homebrew/lib/python3.13/site-packages/traitlets/traitlets.py”, line 1241, in call
return self.func(*args, **kwargs)
~~~~~~~~~^^^^^^^^^^^^^^^^^
File “/opt/homebrew/lib/python3.13/site-packages/nbconvert/exporters/templateexporter.py”, line 569, in _template_paths
template_names = self.get_template_names()
File “/opt/homebrew/lib/python3.13/site-packages/nbconvert/exporters/templateexporter.py”, line 663, in get_template_names
raise ValueError(msg)
ValueError: No template sub-directory with name ‘markdown’ found in the following paths:
/Users/kraussry/Library/Jupyter
/Users/kraussry/Library/Python/3.13/share/jupyter
/opt/homebrew/opt/python@3.13/Frameworks/Python.framework/Versions/3.13/share/jupyter
/usr/local/share/jupyter
/usr/share/jupyter

I am on a Mac and I installed jupyter through homebrew.

Any guidance would be appreciated.

Thanks,
Ryan

I realized this morning that I installed jupytext and notedown via pip yesterday even though my main jupyter install is from homebrew. I am assuming that pip brought in some incompatible version of things in that process.

Does that make sense?

What is the cleanest way to fix that?

Thanks,
Ryan

Ok, I think I fixed it. I uninstalled notedown and traitlets from pip3 and then uninstalled and reinstalled jupyterlab from home brew. Everything seems to be working now. I guess I really did “break system packages”…

Thanks,
Ryan