danielfrg / mkdocs-jupyter

Use Jupyter Notebook in mkdocs
https://mkdocs-jupyter.danielfrg.com
Apache License 2.0
367 stars 45 forks source link

mkdocs serve does not start while using the mkdocs-jupyter plugin #146

Closed jbcodeforce closed 9 months ago

jbcodeforce commented 1 year ago

Hi I installed jupiterlab on my mac M1. I can start and run successfully jupter-lab and works on notebook. I put a notebook in the docs folder and referenced one .ipynb file in mkdocs.

when starting mkdocs serve locally, it uses nbconvert which fails with

File "/Users/boyerje/Documents/Code/jbcodeforce/nbconvert/nbconvert/exporters/templateexporter.py", line 648, in get_template_names raise ValueError( ValueError: No template sub-directory with name 'lab' found in the following paths: /Users/boyerje/Library/Jupyter /Users/boyerje/Library/Python/3.10/share/jupyter /opt/homebrew/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/share/jupyter /usr/local/share/jupyter /usr/share/jupyter I have done a jupyter-lab build to get the lab created. The lab folder is under /opt/homebrew/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/share/jupyter and I also created a soft link to it in the /Users/boyerje/Library/Jupyter folder. Looking at the code of nbconvert, templateexporter.py, I traced the folder and the variable to find the path, and it seems to work.

I do not know if you observed this problem before. Thank you

danielfrg commented 1 year ago

That should not be the case. Looks like its a case of different Python installations, be sure you have jupyter and mkdocs in the same environment.