0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Jupyter(IPython) KernelをMacのTerminalから操作する方法

0
Last updated at Posted at 2017-03-26

表題のメモです。
JupyterのカーネルをMacのTerminalから実行する方法。

1 実験用Kernelの作成

こちらの記事を参考に実験用Kernelを作成。
http://qiita.com/Tsutomu-KKE@github/items/3c996bde01ef2637aadc

2 Kernelを立ち上げ

Terminalから実行

$ python3 keyvaluekernel.py

以下のメッセージが出るので、

NOTE: When using the `ipython kernel` entry point, Ctrl-C will not work.

To exit, you will have to explicitly quit this process, by either sending
"quit" from a client, or using Ctrl-\ in UNIX-like environments.

To read more about this, see https://github.com/ipython/ipython/issues/2049


To connect another client to this kernel, use:
    --existing kernel-18639.json

同じフォルダに"kernel-18639.json"という空ファイルを作成
プログラムを中断し、再起動。

3 コンソール立ち上げ

別のTerminalを起動
Jupyterを起動

$ jupyter console --existing

正常に起動すれば、Kernelに接続して、入力可能なモードに移行。

/usr/local/lib/python3.5/site-packages/jupyter_console/ptshell.py:94: UserWarning: No lexer found for language 'keyvalue'. Treating as plain text.
  warn("No lexer found for language %r. Treating as plain text." % name)
Jupyter console 5.1.0

Dictionry of Key, Value


In [1]: key1 value1
value1
In [2]: ?
key1

いじょです。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?