websocket CLI(コマンドラインインターフェース)「websockets-cli」をインストールする

スポンサーリンク

websocket CLI(コマンドラインインターフェース)「websockets-cli」のインストールについて解説しています。

「websockets-cli(https://pyws.readthedocs.io/en/latest/,https://github.com/lewoudar/ws)」は、WebSocketを含むWebプロジェクトに取り組む際に、コーディングしたものをテストできるCLI(コマンドラインインターフェース)です。

■Python

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

■websockets-cliをインストールする

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

pip install websockets-cli

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

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

py -3.8 -m pip install websockets-cli

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

Defaulting to user installation because normal site-packages is not writeable
Collecting websockets-cli
Using cached websockets_cli-0.2.0-py3-none-any.whl (28 kB)
Requirement already satisfied: shellingham<2.0.0,>=1.4.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from websockets-cli) (1.4.0)
Requirement already satisfied: certifi<2022.0.0,>=2021.10.8 in c:\users\user_\appdata\roaming\python\python38\site-packages (from websockets-cli) (2021.10.8)
Requirement already satisfied: pydantic<2.0.0,>=1.9.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from websockets-cli) (1.9.0)
Requirement already satisfied: trio-websocket<0.10.0,>=0.9.2 in c:\users\user_\appdata\roaming\python\python38\site-packages (from websockets-cli) (0.9.2)
Requirement already satisfied: rich<13.0.0,>=12.0.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from websockets-cli) (12.4.1)
Requirement already satisfied: prompt-toolkit<4.0.0,>=3.0.29 in c:\users\user_\appdata\roaming\python\python38\site-packages (from websockets-cli) (3.0.29)
Requirement already satisfied: click<9.0.0,>=8.0.4 in c:\users\user_\appdata\roaming\python\python38\site-packages (from websockets-cli) (8.1.3)
Requirement already satisfied: tomli<3.0.0,>=2.0.1 in c:\users\user_\appdata\roaming\python\python38\site-packages (from websockets-cli) (2.0.1)
Requirement already satisfied: python-dotenv<0.21.0,>=0.20.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from websockets-cli) (0.20.0)
Requirement already satisfied: click-didyoumean<0.4.0,>=0.3.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from websockets-cli) (0.3.0)
Requirement already satisfied: colorama in c:\users\user_\appdata\roaming\python\python38\site-packages (from click<9.0.0,>=8.0.4->websockets-cli) (0.4.4)
Requirement already satisfied: wcwidth in c:\users\user_\appdata\roaming\python\python38\site-packages (from prompt-toolkit<4.0.0,>=3.0.29->websockets-cli) (0.2.5)
Requirement already satisfied: typing-extensions>=3.7.4.3 in c:\users\user_\appdata\roaming\python\python38\site-packages (from pydantic<2.0.0,>=1.9.0->websockets-cli) (4.0.0)
Requirement already satisfied: commonmark<0.10.0,>=0.9.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from rich<13.0.0,>=12.0.0->websockets-cli) (0.9.1)
Requirement already satisfied: pygments<3.0.0,>=2.6.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from rich<13.0.0,>=12.0.0->websockets-cli) (2.12.0)
Requirement already satisfied: async-generator>=1.10 in c:\users\user_\appdata\roaming\python\python38\site-packages (from trio-websocket<0.10.0,>=0.9.2->websockets-cli) (1.10)
Requirement already satisfied: wsproto>=0.14 in c:\users\user_\appdata\roaming\python\python38\site-packages (from trio-websocket<0.10.0,>=0.9.2->websockets-cli) (1.1.0)
Requirement already satisfied: trio>=0.11 in c:\users\user_\appdata\roaming\python\python38\site-packages (from trio-websocket<0.10.0,>=0.9.2->websockets-cli) (0.20.0)
Requirement already satisfied: cffi>=1.14 in c:\users\user_\appdata\roaming\python\python38\site-packages (from trio>=0.11->trio-websocket<0.10.0,>=0.9.2->websockets-cli) (1.15.0)
Requirement already satisfied: sniffio in c:\users\user_\appdata\roaming\python\python38\site-packages (from trio>=0.11->trio-websocket<0.10.0,>=0.9.2->websockets-cli) (1.2.0)
Requirement already satisfied: idna in c:\users\user_\appdata\roaming\python\python38\site-packages (from trio>=0.11->trio-websocket<0.10.0,>=0.9.2->websockets-cli) (3.2)
Requirement already satisfied: attrs>=19.2.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from trio>=0.11->trio-websocket<0.10.0,>=0.9.2->websockets-cli) (21.4.0)
Requirement already satisfied: outcome in c:\users\user_\appdata\roaming\python\python38\site-packages (from trio>=0.11->trio-websocket<0.10.0,>=0.9.2->websockets-cli) (1.1.0)
Requirement already satisfied: sortedcontainers in c:\users\user_\appdata\roaming\python\python38\site-packages (from trio>=0.11->trio-websocket<0.10.0,>=0.9.2->websockets-cli) (2.4.0)
Requirement already satisfied: h11<1,>=0.9.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from wsproto>=0.14->trio-websocket<0.10.0,>=0.9.2->websockets-cli) (0.12.0)
Requirement already satisfied: pycparser in c:\users\user_\appdata\roaming\python\python38\site-packages (from cffi>=1.14->trio>=0.11->trio-websocket<0.10.0,>=0.9.2->websockets-cli) (2.21)
Installing collected packages: websockets-cli
Successfully installed websockets-cli-0.2.0

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

なお、今回はwebsockets-cliのバージョン0.2.0をインストールしました。

コメント

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