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, eg from test.py to test.ipynb, but then I can't open the.ipynb file.
Simplest way I found without installing extra dependencies is:
Then you can add #%%
markers to separate the cells.
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
Try using
pip install ipynb-py-convert
https://medium.com/@researchplex/the-easiest-way-to-convert-jupyter-ipynb-to-python-py-912e39f16917
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.