CLIを自動的に生成するためのライブラリ「Fire」のインストール

スポンサーリンク

コマンドラインインターフェイス(CLI)を自動的に生成するためのライブラリ「Fire」のインストールについて解説しています。

「Fire(https://github.com/google/python-fire)」はあらゆるPythonオブジェクトからコマンドラインインタフェース(CLI)を自動生成することができます。

■Python

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

■Fireをインストールする

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

pip install fire

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

なお、今回は、pythonランチャーを使用しており、Python Version 3.8.5にインストールを行うために、pipを使う場合にはコマンドでの切り替えを行います。

py -3.8 -m pip install fire

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

Defaulting to user installation because normal site-packages is not writeable
Collecting fire
Downloading fire-0.4.0.tar.gz (87 kB)
|████████████████████████████████| 87 kB 1.2 MB/s
Preparing metadata (setup.py) ... done
Requirement already satisfied: six in c:\users\user_\appdata\roaming\python\python38\site-packages (from fire) (1.15.0)
Requirement already satisfied: termcolor in c:\users\user_\appdata\roaming\python\python38\site-packages (from fire) (1.1.0)
Building wheels for collected packages: fire
Building wheel for fire (setup.py) ... done
Created wheel for fire: filename=fire-0.4.0-py2.py3-none-any.whl size=115943 sha256=5db5001b8c7d53dbbca1a5704b0a91953e07c58ebd5c9b1750be9b218b9f4034
Stored in directory: c:\users\user_\appdata\local\pip\cache\wheelsfa990ee4d73a8479fe2922445e8a876d38cfbfed052284c6a1
Successfully built fire
Installing collected packages: fire
Successfully installed fire-0.4.0

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

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

コメント

タイトルとURLをコピーしました