webmaster-kazu.com

テクノロジー・データ分析・実践ログ・その他

ランタイム オブジェクトのメモリ構造体を表示、変更できる「einspect」のインストール

カテゴリ: Python【初歩から現場実務的なもの】

ランタイム オブジェクトのメモリ構造体を表示、変更できる「einspect」のインストールについて解説しています。

「einspect(https://github.com/ionite34/einspect,https://docs.ionite.io/einspect/)」は、組み込みオブジェクトの詳細な状態などを確認できるCPython 実装を中心に開発されたライブラリです。

■Python

今回のPythonのバージョンは、「3.8.5」を使用しています。(Windows10)(pythonランチャーでの確認)

■einspectをインストールする

einspectをインストールを行いますが、今回はpipを経由してインストールを行うので、まずWindowsのコマンドプロンプトを起動します。

pip install einspect

起動後、上記のコマンドを入力し、Enterキーを押します。

なお、今回は、pythonランチャーを使用しており、Python Version 3.8.5にインストールを行うために、バージョンの切り替えを行います。

py -3.8 -m pip install einspect

切り替えるために、上記のコマンドを入力し、Enterキーを押します。

Defaulting to user installation because normal site-packages is not writeable

Collecting einspect

Downloading einspect-0.5.4-py3-none-any.whl (67 kB)

---------------------------------------- 67.3/67.3 kB 1.8 MB/s eta 0:00:00

Requirement already satisfied: typing-extensions<5.0.0,>=4.4.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from einspect) (4.4.0)

Installing collected packages: einspect

Successfully installed einspect-0.5.4

Enterキーを押すと、インストールが開始され、「Successfully installed」と表示されます。これが表示されれば、einspectが正常にインストールされたことになります。

なお、今回はeinspectのバージョン0.5.4をインストールしました。