As Jupyter Notebook integration is available in PyCharm professional, is there a GUI option to convert a .py to a .ipynb file? I tried to edit the file extension, e.g. from test.py to test.ipynb, but then I can't open the .ipynb file.
As Jupyter Notebook integration is available in PyCharm professional, is there a GUI option to convert a .py to a .ipynb file? I tried to edit the file extension, e.g. from test.py to test.ipynb, but then I can't open the .ipynb file.
If all you want is just to run your code cell by cell directly on Pycharm's console, you don't need to convert it from .py to .ipynb.
Just activate View > Scientific Mode and add #%% markers to separate the cells directly in your .py file. Now you can execute it by using the green arrows on the left side of your code.
Tested on Pycharm professional 2020.3.2
Simplest way I found without installing extra dependencies is:
Then you can add #%% markers to separate the cells.
Try using
pip install ipynb-py-convert
https://medium.com/@researchplex/the-easiest-way-to-convert-jupyter-ipynb-to-python-py-912e39f16917