差分
このページの2つのバージョン間の差分を表示します。
| 両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
| python:ipython [2019/07/27 03:40] – ともやん | python:ipython [2025/03/23 11:56] (現在) – [Linux] ともやん | ||
|---|---|---|---|
| 行 1: | 行 1: | ||
| - | ====== IPython | + | ====== IPython ====== |
| + | <WRAP #logo> | ||
| + | {{python: | ||
| + | </ | ||
| + | \\ | ||
| + | 本家: [[https:// | ||
| + | ソースコード: | ||
| + | ドキュメント: | ||
| + | \\ | ||
| + | **IPython** (アイパイソン) は Python を対話的に実行するためのシェルである。CPython 内蔵の対話的に実行するためのシェルと比べ、型イントロスペクション (英語: Type introspection) 機能、対話的実行のための文法などが追加されてあり、コードのシンタックスハイライトおよびタブによる補完が行える。IPython の開発は NumFOCUS によって財政的に支援されている。\\ | ||
| + | [[wwjp> | ||
| - | ===== Linux ===== | + | ===== インストール |
| - | < | + | |
| - | $ pip3 install ipython | + | |
| - | </ | + | |
| - | ===== Windows | + | ==== Linux ==== |
| + | <WRAP color_term> | ||
| + | <WRAP color_command>< | ||
| + | <font color="# | ||
| + | </ | ||
| + | <WRAP color_result_hlong>< | ||
| + | Defaulting to user installation because normal site-packages is not writeable | ||
| + | Collecting ipython | ||
| + | Downloading ipython-9.0.2-py3-none-any.whl.metadata (4.3 kB) | ||
| + | Collecting decorator (from ipython) | ||
| + | Downloading decorator-5.2.1-py3-none-any.whl.metadata (3.9 kB) | ||
| + | Collecting ipython-pygments-lexers (from ipython) | ||
| + | Downloading ipython_pygments_lexers-1.1.1-py3-none-any.whl.metadata (1.1 kB) | ||
| + | Collecting jedi& | ||
| + | Downloading jedi-0.19.2-py2.py3-none-any.whl.metadata (22 kB) | ||
| + | Collecting matplotlib-inline (from ipython) | ||
| + | Downloading matplotlib_inline-0.1.7-py3-none-any.whl.metadata (3.9 kB) | ||
| + | Collecting pexpect& | ||
| + | Downloading pexpect-4.9.0-py2.py3-none-any.whl.metadata (2.5 kB) | ||
| + | Collecting prompt_toolkit& | ||
| + | Downloading prompt_toolkit-3.0.50-py3-none-any.whl.metadata (6.6 kB) | ||
| + | Collecting pygments& | ||
| + | Downloading pygments-2.19.1-py3-none-any.whl.metadata (2.5 kB) | ||
| + | Collecting stack_data (from ipython) | ||
| + | Downloading stack_data-0.6.3-py3-none-any.whl.metadata (18 kB) | ||
| + | Collecting traitlets& | ||
| + | Downloading traitlets-5.14.3-py3-none-any.whl.metadata (10 kB) | ||
| + | Collecting parso& | ||
| + | Downloading parso-0.8.4-py2.py3-none-any.whl.metadata (7.7 kB) | ||
| + | Collecting ptyprocess& | ||
| + | Downloading ptyprocess-0.7.0-py2.py3-none-any.whl.metadata (1.3 kB) | ||
| + | Collecting wcwidth (from prompt_toolkit& | ||
| + | Downloading wcwidth-0.2.13-py2.py3-none-any.whl.metadata (14 kB) | ||
| + | Collecting executing& | ||
| + | Downloading executing-2.2.0-py2.py3-none-any.whl.metadata (8.9 kB) | ||
| + | Collecting asttokens& | ||
| + | Downloading asttokens-3.0.0-py3-none-any.whl.metadata (4.7 kB) | ||
| + | Collecting pure-eval (from stack_data-& | ||
| + | Downloading pure_eval-0.2.3-py3-none-any.whl.metadata (6.3 kB) | ||
| + | Downloading ipython-9.0.2-py3-none-any.whl (600 kB) | ||
| + | < | ||
| + | Downloading jedi-0.19.2-py2.py3-none-any.whl (1.6 MB) | ||
| + | < | ||
| + | Downloading pexpect-4.9.0-py2.py3-none-any.whl (63 kB) | ||
| + | Downloading prompt_toolkit-3.0.50-py3-none-any.whl (387 kB) | ||
| + | Downloading pygments-2.19.1-py3-none-any.whl (1.2 MB) | ||
| + | < | ||
| + | Downloading traitlets-5.14.3-py3-none-any.whl (85 kB) | ||
| + | Downloading decorator-5.2.1-py3-none-any.whl (9.2 kB) | ||
| + | Downloading ipython_pygments_lexers-1.1.1-py3-none-any.whl (8.1 kB) | ||
| + | Downloading matplotlib_inline-0.1.7-py3-none-any.whl (9.9 kB) | ||
| + | Downloading stack_data-0.6.3-py3-none-any.whl (24 kB) | ||
| + | Downloading asttokens-3.0.0-py3-none-any.whl (26 kB) | ||
| + | Downloading executing-2.2.0-py2.py3-none-any.whl (26 kB) | ||
| + | Downloading parso-0.8.4-py2.py3-none-any.whl (103 kB) | ||
| + | Downloading ptyprocess-0.7.0-py2.py3-none-any.whl (13 kB) | ||
| + | Downloading pure_eval-0.2.3-py3-none-any.whl (11 kB) | ||
| + | Downloading wcwidth-0.2.13-py2.py3-none-any.whl (34 kB) | ||
| + | Installing collected packages: wcwidth, pure-eval, ptyprocess, traitlets, pygments, prompt_toolkit, | ||
| + | Successfully installed asttokens-3.0.0 decorator-5.2.1 executing-2.2.0 ipython-9.0.2 ipython-pygments-lexers-1.1.1 jedi-0.19.2 matplotlib-inline-0.1.7 parso-0.8.4 pexpect-4.9.0 prompt_toolkit-3.0.50 ptyprocess-0.7.0 pure-eval-0.2.3 pygments-2.19.1 stack_data-0.6.3 traitlets-5.14.3 wcwidth-0.2.13 | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | ==== Windows | ||
| < | < | ||
| > pip install ipython | > pip install ipython | ||
| </ | </ | ||
| - | < | + | < |
| < | < | ||
| Collecting ipython | Collecting ipython | ||
| 行 66: | 行 136: | ||
| </ | </ | ||
| - | ===== ipython | + | ===== IPython |
| ==== Linux ==== | ==== Linux ==== | ||
| - | <code> | + | <WRAP color_term> |
| - | $ ipython | + | <WRAP color_command>< |
| - | </code> | + | <font color="# |
| + | </ | ||
| + | <WRAP color_result>< | ||
| + | Python 3.13.2 (main, Feb 4 2025, 00:00:00) [GCC 14.2.1 20250110 (Red Hat 14.2.1-7)] | ||
| + | Type & | ||
| + | IPython 9.0.2 -- An enhanced Interactive Python. Type & | ||
| + | Tip: You can find how to type a latex symbol by back completing it `\θ& | ||
| + | |||
| + | <font color="# | ||
| + | </ | ||
| + | </WRAP> | ||
| ==== Windows ==== | ==== Windows ==== | ||
| 行 77: | 行 157: | ||
| > ipython | > ipython | ||
| </ | </ | ||
| + | <WRAP color_result_hlong> | ||
| < | < | ||
| Python 3.7.4 (tags/ | Python 3.7.4 (tags/ | ||
| 行 278: | 行 359: | ||
| In [2]: | In [2]: | ||
| </ | </ | ||
| + | </ | ||
| + | ====== ☢️古い資料です (Obsolete)☢️ ====== | ||
| + | |||
| + | ===== IPythonの導入 ===== | ||
| + | -pip を利用する場合、以下のコマンドを実行する。< | ||
| + | > pip install ipython pyreadline</ | ||
| + | Downloading/ | ||
| + | Downloading ipython-0.12.1.tar.gz (4.3Mb): 4.3Mb downloaded | ||
| + | Running setup.py egg_info for package ipython | ||
| + | |||
| + | no previously-included directories found matching ' | ||
| + | no previously-included directories found matching ' | ||
| + | warning: no files found matching ' | ||
| + | warning: no previously-included files found matching ' | ||
| + | warning: no previously-included files found matching ' | ||
| + | no previously-included directories found matching ' | ||
| + | no previously-included directories found matching ' | ||
| + | no previously-included directories found matching ' | ||
| + | no previously-included directories found matching ' | ||
| + | warning: no previously-included files matching ' | ||
| + | warning: no previously-included files matching ' | ||
| + | warning: no previously-included files matching ' | ||
| + | warning: no previously-included files matching ' | ||
| + | Downloading/ | ||
| + | Downloading pyreadline-2.0-dev1.zip (109Kb): 109Kb downloaded | ||
| + | Running setup.py egg_info for package pyreadline | ||
| + | |||
| + | package init file ' | ||
| + | Installing collected packages: ipython, pyreadline | ||
| + | Running setup.py install for ipython | ||
| + | |||
| + | no previously-included directories found matching ' | ||
| + | no previously-included directories found matching ' | ||
| + | warning: no files found matching ' | ||
| + | warning: no previously-included files found matching ' | ||
| + | warning: no previously-included files found matching ' | ||
| + | no previously-included directories found matching ' | ||
| + | no previously-included directories found matching ' | ||
| + | no previously-included directories found matching ' | ||
| + | no previously-included directories found matching ' | ||
| + | warning: no previously-included files matching ' | ||
| + | warning: no previously-included files matching ' | ||
| + | warning: no previously-included files matching ' | ||
| + | warning: no previously-included files matching ' | ||
| + | Installing ipcontroller-script.py script to C: | ||
| + | Installing ipcontroller.exe script to C: | ||
| + | Installing ipcontroller.exe.manifest script to C: | ||
| + | Installing iptest-script.py script to C: | ||
| + | Installing iptest.exe script to C: | ||
| + | Installing iptest.exe.manifest script to C: | ||
| + | Installing ipcluster-script.py script to C: | ||
| + | Installing ipcluster.exe script to C: | ||
| + | Installing ipcluster.exe.manifest script to C: | ||
| + | Installing ipython-script.py script to C: | ||
| + | Installing ipython.exe script to C: | ||
| + | Installing ipython.exe.manifest script to C: | ||
| + | Installing pycolor-script.py script to C: | ||
| + | Installing pycolor.exe script to C: | ||
| + | Installing pycolor.exe.manifest script to C: | ||
| + | Installing iplogger-script.py script to C: | ||
| + | Installing iplogger.exe script to C: | ||
| + | Installing iplogger.exe.manifest script to C: | ||
| + | Installing irunner-script.py script to C: | ||
| + | Installing irunner.exe script to C: | ||
| + | Installing irunner.exe.manifest script to C: | ||
| + | Installing ipengine-script.py script to C: | ||
| + | Installing ipengine.exe script to C: | ||
| + | Installing ipengine.exe.manifest script to C: | ||
| + | Installing ipython-qtconsole-script.pyw script to C: | ||
| + | Installing ipython-qtconsole.exe script to C: | ||
| + | Installing ipython-qtconsole.exe.manifest script to C: | ||
| + | Running setup.py install for pyreadline | ||
| + | package init file ' | ||
| + | |||
| + | Successfully installed ipython pyreadline | ||
| + | Cleaning up... | ||
| + | </ | ||
| + | - Windows の場合は C: | ||
| + | |||
| + | ==== IPythonの導入(Windows編) ===== | ||
| + | - [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | - ipython-x.xx.x.win32-setup.exe を実行してインストールを行う。 | ||
| + | - pyreadline-x.x-win32-setup.exe を実行してインストールを行う。 | ||
| + | - コマンドラインより動作確認を行う。< | ||
| + | > ipython | ||
| + | C: | ||
| + | from sets import Set | ||
| + | Python 2.6.2 (r262: | ||
| + | Type " | ||
| + | |||
| + | IPython 0.9.1 -- An enhanced Interactive Python. | ||
| + | ? -> Introduction and overview of IPython' | ||
| + | %quickref -> Quick reference. | ||
| + | help -> Python' | ||
| + | object? | ||
| + | |||
| + | In [1]: | ||
| + | </ | ||
| + | * 「DeprecationWarning: | ||
| + | * ここで ipython を実行しても以下のようなエラーになる場合< | ||
| + | > ipython | ||
| + | ' | ||
| + | 操作可能なプログラムまたはバッチ ファイルとして認識されていません。 | ||
| + | </ | ||
| + | C: | ||