LoginSignup
0
3

More than 5 years have passed since last update.

Jupyter NotebookでPythonの練習

Last updated at Posted at 2017-10-12

Jupyter notebookを使ってPythonの練習をしてみます

2. Jupyter Notebookを使ってPythonの基本を確認する

-githubのPythonの練習サンプルを開き、画面右上の緑の「Download ZIP」ボタンを押してzipファイルをダウンロードします

スクリーンショット 2017-10-12 17.03.21.png

  • Python3.6を使用するなどPython実行に仮想環境(virtualenvなど)を使用している場合、まだactivateしていない((xx)プロンプトが表示されていない)場合、source xx/bin/activateでPython実行用仮想環境をactivateします。プロンプトに(xx)が表示されます
Python実行用仮想環境をactivateする
MacBook-Pro:tftest tohru$ source py3/bin/activate
(py3) MacBook-Pro:tftest tohru$ 

  • jupyter notebookと入力し、jupyter notebookを起動させます。
  • jupyterを未インストールの場合、Python2.x 環境であればpip install jupyterで、Python3.x環境であればpip3 install jupyterででインストールします
(py3) MacBook-Pro:Python_basic tohru$ ls
Python_basic.ipynb
(tf) MacBook-Pro:Python_basic tohru$ jupyter notebook

  • Jupyter notebookのメニューが表示されるので、「Python_basic.ipynb」を選択して実行します。

スクリーンショット 2017-10-12 17.03.49.png

スクリーンショット 2017-10-12 17.04.08.png

 - このjupyter notebookの内容はhttps://github.com/eggplnt/python_basic/blob/master/python_basic/Python_Basic.ipynbで確認できます
 スクリーンショット 2017-10-17 7.46.34.png

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