본문 바로가기
  • "하나씩 기록하다보면 누군가에게 도움이 되지 않을까"
IT/Python

[Python] 주피터 파일(.ipynb) -> 파이썬 파일(.py) 변환

by raVineL 2021. 7. 8.
728x90

 ** 윈도우에서 변환할때 python -m ipython nbconvert --to script *.ipynb로 하면됌

 

Install ipython libraries (Of course, you can skip if already installed.)

> pip install ipython

> pip install nbconvert

 

Convert single file

> ipython nbconvert — to script abc.ipynb

You can have abc.py

 

Convert multi files

> ipython nbconvert — to script abc.ipynb def.ipynb

abc.py, def.py

> ipython nbconvert — to script *.ipynb

abc.py, def.py

 

https://medium.com/@researchplex/the-easiest-way-to-convert-jupyter-ipynb-to-python-py-912e39f16917

 

The easiest way to convert Jupyter(.ipynb) to Python(.py)

Install ipython libraries (Of course, you can skip if already installed.)

medium.com

 

728x90

댓글