Hi, I have a problem with nbdev and notebook2script . I have installed the following versions: nbdev 2.3.6; notebook2script 0.2.1.
When I try to run from nbdev.export import notebook2script I get the following error:
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Input In [30], in <cell line: 1>()
----> 1 from nbdev.export import notebook2script
ImportError: cannot import name 'notebook2script' from 'nbdev.export' (/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/nbdev/export.py)
Thank you @chrwittm, I had trouble with that!
I’ll add that the 2nd parameter to nb_export is the directory path and not the filename, so if you wish to create the Python file directly in the same dir as your notebook, you can do this: nbdev.export.nb_export('app.ipynb', './')
You might see ExportModuleProc._default_exp_() missing 1 required positional argument: 'exp_to' if you’ve called #|default_exp without a filename. So just run the cell again as #|default_exp app and then nbdev.export.nb_export('app.ipynb').
And I would like to add to @chrwittm and @dway8 comments that if it’s running without error but it’s not creating any .py file for you, it’s because you need to install JupyterLab Extension. If you are using pip you can run below:
pip install jupyterlab-quarto
Here is the link for other ways of its installation:
I have the same problem with notebook2script. Kaggle does not run it and locally it is not working after conda installations and pip installations.
The above solution did not work. to uninstall do