How to create a jupyter_notebook config which syncs .ipynb with .py files?

201 Views Asked by At

I found guide on how to get into coding with python. There where some tips including to create a config file which syncs .ipynb with .py files by creating a .jupyter/jupyter_notebook_config.py file and then put this into it:

c.NotebookApp.contents_manager_class = "jupytext.TextFileContentsManager"
# Always pair ipynb notebooks to py files
c.ContentsManager.default_jupytext_formats = "ipynb,py"

However, it seems it is not working for me. I installed jupytext and followed every step. The only way I found it works is with the following by changing the notebooks Metadata:

"jupytext": {
"formats": "ipynb,py"
 },

Is there an updated way to create the config file?

Since im new I would really appreciate your help!

Tried changing the config file in Atom by putting in the code above

1

There are 1 best solutions below

0
Cerberton On

I would recommend trying out VSCode as an editor. Atom is no longer being maintained.

If you install VSCode, there is an extension which will do what you require called "Datascientists utils". It's very barebones but it works well.

Here's a link: https://marketplace.visualstudio.com/items?itemName=FrancoMilanese.datascientists-utils