LoginSignup
5
6

More than 5 years have passed since last update.

Jupyter notebookファイルを単に見る

Last updated at Posted at 2017-06-14

Jupyter notebookなどのipynb形式のファイルを、Jupyterを開かずに単に見たい。

Githubはipynb形式を解釈できるため、Github上のファイルは閲覧できます。ただし、Bitbucketではその機能はまだないようです(Issueへのリンク)。

ローカルにあるipynbファイルがある場合、下記のコマンドで内容をブラウザで閲覧できます。

jupyter nbconvert filename.ipynb --stdout > tmp.html; firefox tmp.html
  • nbconvertコマンドを使ってHTMLファイルを生成し、それをブラウザで開いています
  • filename.ipynbというところは閲覧したいファイルに変えてください
  • tmp.htmlというファイルが作られるので適宜削除するなどしてください
  • firefoxの部分はお好きなブラウザに変えてください

なお、Jupyterは必要です。インストールにはこちらなどを参照ください。

5
6
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
5
6