LoginSignup
0
1

More than 1 year has passed since last update.

Ubuntuで.ipynbを.pyに変換する方法

Last updated at Posted at 2021-11-29

はじめに

.ipynbを.pyに変換する方法のメモ。

動作環境

  • Windows 11
  • Ubuntu 20.04.1
  • pip 20.0.2
  • python 3.8

前提条件

  • python3系
  • pip (pip3)
  • jupyter

インストール

以下のインストールが必要。

sudo apt install jupyter-core
sudo apt install jupyter-nbconvert
pip3 install jupyter

実行

以下を実行すると.ipynbと同じディレクトリに.pyが作成される。

jupyter-nbconvert --to script terget.ipynb

terget.ipynbが変換したい.ipynbファイル。

まとめ

Jupyter NotebookでPythonを書くなら、pdftotextを使うのに必要。
タイプミスに気を付ける。

0
1
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
1