LoginSignup
0
2

More than 3 years have passed since last update.

jupyterをpyに変換する

Posted at

jupyterだと長い処理を走らせておくのに、どうも心もとないと感じることがあるので、scriptファイルに変換する方法をメモしておきます。


jupyter nbconvert --to script myAnalysys.ipynb 

変換といいつつ、もとのjupyterも残るのでご安心を!

(変換というか、作成?)

注意点二つ

①コマンドはipythonで走らせる

ipython hoge.py

②matplotlibのinlineはコメントアウト
 画像を描画できない環境だとエラーがでる

No event loop integration for 'inline'. Supported event loops are: 
qt, qt4, qt5, gtk, gtk2, gtk3, tk, wx, pyglet, glut, osx

inlineで検索して該当箇所をコメントアウト

0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2