7. Jupyter で書いてみる
基本的なコマンド
• Enter → 改行
• Shift + Enter →実行
• Alt + Enter → 枠追加
下線を入力してください
in[1]: 3*6
Out[1]: 18
in[2]: a = 2
b = a
in[3]: b
Out[3]: 2
計算ができる
変数が書ける
変数を持ち越せる
返す値がない場合
返り値はない
12. Macの人のコマンドの例
• tan:~ tan$ pyenv version
system(…………)
• tan:~ tan$ pyenv install anaconda3-4.4.0
Downloading Anaconda3-4.4.0-MacOSX-x86_64.sh...->
https://repo.continuum.io/archive/Anaconda3-4.4.0-MacOSX-x86_64.shInstalling Anaconda3-4.4.0-
MacOSX-x86_64...Installed Anaconda3-4.4.0-MacOSX-x86_64 to /Users/名前
/.pyenv/versions/anaconda3-4.4.0
• tan:~ tan$ pyenv global anaconda3-4.4.0
• tan:~ tan$ python –V
Python 3.6.1 :: Anaconda 4.4.0 (x86_64)
• tan:~ tan$ jupyter notebook
[I 18:41:13.557 NotebookApp] Writing notebook server cookie secret to /Users/hoge
[I 18:41:13.587 NotebookApp] Serving notebooks from local directory: /Users/hoge
[I 18:41:13.587 NotebookApp] 0 active kernels
[I 18:41:13.587 NotebookApp] The Jupyter Notebook is running at:
http://localhost:8888/?token=hogehoge
[I 18:41:13.587 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to
skip confirmation).
[C 18:41:13.591 NotebookApp] Copy/paste this URL into your browser when you connect for
the first time, to login with a token: http://localhost:8888/?token=hogehoge
[I 18:41:14.335 NotebookApp] Accepting one-time-token-authenticated connection from ::1
[I 18:41:36.566 NotebookApp] Creating new notebook in /Desktop/hoge