Run this command to install the jupytext extension:
conda install jupytext -c conda-forge
Start/restart jupyter. In the environment used to launch jupyter notebook
you should now see the File > Jupytext menu. In jupyter lab
, Jupytext adds a set of commands to the command palette (View / Activate Command Palette
, or Ctrl+Shift+C
):
You can use the pair command to associate the notebook file with a markdown version. That should be persistent for that specific notebook file.
File > Jupytext > Pair Notebook with Markdown
To make it the default for all notebooks you open, you need to add a configuration file. On the versions of both Jupyter lab and Jupyter notebook that I have, this shows the directories where the configuration file can be stored:
from jupytext.config import global_jupytext_configuration_directories
list(global_jupytext_configuration_directories())
For me the above resulted in this:
['C:\\Users\\my username\\jupytext',
'C:\\Users\\my username',
'C:\\ProgramData\\jupytext',
'C:\\ProgramData']
So, I placed a text file at C:\Users\my username\jupytext\jupytext.toml with this contents:
# Always pair ipynb notebooks to md files
default_jupytext_formats = "ipynb,md"
See this for more details https://jupytext.readthedocs.io/en/latest/config.html