LoginSignup
0
0

More than 5 years have passed since last update.

macports2.5.3でiPythonをインストール(改)

Posted at

以前と同じように(参考URL)インストールしても上手く行かなかった…ので、改めて上手く行った方法を書き留めておく。

参考URL

macportsでiPythonをインストール - Qiita https://qiita.com/H1r0ak1Y0sh10ka/items/2a5391a9159f4e2c9812

手順

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

以前はpy-jupyterでインストールしたが、py37-jupyterとpythonのバージョンを指定してインストールした。

terminal
$ sudo port install py37-jupyter
--->  Computing dependencies for py37-jupyter
The following dependencies will be installed: 
 ipython3_select
 py37-appnope
 py37-backcall
 py37-bleach
 py37-dateutil
 py37-decorator
 py37-entrypoints
 py37-html5lib
 py37-ipykernel
 py37-ipython
 py37-ipython_genutils
 py37-ipywidgets
 py37-jedi
 py37-jinja2
 py37-jsonschema
 py37-jupyter_client
 py37-jupyter_console
 py37-jupyter_core
 py37-markupsafe
 py37-mistune
 py37-nbconvert
 py37-nbformat
 py37-notebook
 py37-pandocfilters
 py37-parso
 py37-pexpect
 py37-pickleshare
 py37-prometheus_client
 py37-prompt_toolkit
 py37-ptyprocess
 py37-pygments
 py37-send2trash
 py37-setuptools
 py37-simplegeneric
 py37-six
 py37-terminado
 py37-testpath
 py37-tornado
 py37-traitlets
 py37-tz
 py37-wcwidth
 py37-webencodings
 py37-widgetsnbextension
 py37-zmq
Continue? [Y/n]: Y
--->  Fetching archive for ipython3_select
(中略)
--->  Installing py37-jupyter @1.0.0_1
--->  Activating py37-jupyter @1.0.0_1
--->  Cleaning py37-jupyter
--->  Updating database of binaries
--->  Updating database of C++ stdlib usage
--->  Scanning binaries for linking errors
--->  No broken files found.
--->  No broken ports found.
--->  Some of the ports you installed have notes:
  py37-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 IPython3 (i.e., the version run by the 'ipython' or 'ipython3' commands), run one or both of:

        sudo port select --set ipython py37-ipython
        sudo port select --set ipython3 py37-ipython
  py37-pygments has the following notes:
    To make the Python 3.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 py37-pygments

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

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

terminal
$ sudo port select --set ipython py37-ipython
Password:
Selecting 'py37-ipython' for 'ipython' succeeded. 'py37-ipython' is now active.
$ sudo port select --set ipython3 py37-ipython
Selecting 'py37-ipython' for 'ipython2' succeeded. 'py37-ipython' is now active.
$ sudo  port select --set pygments py37-pygments
Selecting 'py37-pygments' for 'pygments' succeeded. 'py37-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
(後略)

動いた。良かった

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