LoginSignup
0
0

More than 5 years have passed since last update.

macportsでiPythonをインストール

Posted at

現実逃避にボスに紹介してもらって、jupterでパッとInteractiveに操作して画が描けるの面白そうだなと思って、こつこつと触ってみることにした。

参考URL

Jupyter Notebook(IPython)のインストールと始め方 - TASK NOTES http://www.task-notes.com/entry/20151129/1448794509
Macでpythonを使えるように|KEI|note https://note.mu/kei12/n/n1ff13bbbfbd4

はじめに

そもそも、Jupyterに似たようなもの(という認識を僕はしていた)IPython (もしくはIPython Notebook)は何が違うのかというと、結論から言うと同じものらしい。
本来はPythonだけだったのだが、多言語に対応するようになり、Jupyterと呼ばれるようになったそうだ。
なので、Pythonを使う分には、JupyterもIpython Notebookも同じものという認識で間違いない(はず)

手順

1.macportsでpy-jupyterをインストールする。

terminal
$ sudo port install py-jupyter
(中略)
--->  Some of the ports you installed have notes:
  py27-ipython has the following notes:
    Please note that since version 4.0 IPython was refactored and splitted across several packages under new project named Jupyter.

    To make this the default IPython or IPython2 (i.e., the version run by the 'ipython' or 'ipython2' commands), run one or both of:

        sudo port select --set ipython py27-ipython
        sudo port select --set ipython2 py27-ipython
  py27-pygments has the following notes:
    To make the Python 2.7 version of Pygments the one that is run when you execute the commands without a version suffix, e.g. 'pygmentize', run:

    port select --set pygments py27-pygments

とこんなコメントが出てくる。(python2.7の場合)

2.コメント通りデフォルトの設定をする。

terminal
$ sudo port select --set ipython py27-ipython
Password:
Selecting 'py27-ipython' for 'ipython' succeeded. 'py27-ipython' is now active.
$ sudo port select --set ipython2 py27-ipython
Selecting 'py27-ipython' for 'ipython2' succeeded. 'py27-ipython' is now active.
$ sudo  port select --set pygments py27-pygments
Selecting 'py27-pygments' for 'pygments' succeeded. 'py27-pygments' is now active.

3.Ipython notebookを動かす

terminal
$ ipython notebook
[TerminalIPythonApp] WARNING | Subcommand `ipython notebook` is deprecated and will be removed in future versions.
[TerminalIPythonApp] WARNING | You likely want to use `jupyter notebook` in the future
(後略)

動いた。
jupyterに近い将来置き換わるってちゃんとコメントが。

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