[Python] How to config automatic sync Jupyter notebook .ipynb and .py files in VSCode e.g. by...

Discussão em 'Python' iniciado por Stack, Março 16, 2025.

  1. Stack

    Stack Membro Participativo

    I have written some Jupyter notebooks using original Jupyter notebook web interface. All notebooks are synced nicely in this way.

    But now, I would like to edit my notebooks in the VSCode. But I cannot configure syncing notebook file with its python script.

    I tried this using jupytext:

    • created file jupytext in the folder ~/.config
    • put the next code into this file:

    # Always pair ipynb notebooks to py:percent files
    default_jupytext_formats = "ipynb,py:percent"


    But no effect!

    (Update) Can this be achieved, as a first solution, using VSCode Tasks (I am not used tasks yet)?

    May be it possible to run the task with jupytext command if the notebook file is opened/saved/modified?

    Continue reading...

Compartilhe esta Página