Pythonデータ構造を検証するためのライブラリ「schema」のインストールについて解説しています。
「schema(https://github.com/keleshev/schema)」は画像の背景を削除することができます。
■Python
今回のPythonのバージョンは、「3.8.5」を使用しています。(Windows11)
■schemaをインストールする
schemaをインストールを行いますが、今回はpipを経由してインストールを行うので、まずWindowsのコマンドプロンプトを起動します。
pip install schema
起動後、上記のコマンドを入力し、Enterキーを押します。
なお、今回は、pythonランチャーを使用しており、Python Version 3.8.5にインストールを行うために、バージョンの切り替えを行います。
py -3.8 -m pip install schema
切り替えるために、上記のコマンドを入力し、Enterキーを押します。
Defaulting to user installation because normal site-packages is not writeable Collecting schema Downloading schema-0.7.5-py2.py3-none-any.whl (17 kB) Collecting contextlib2>=0.5.5 Downloading contextlib2-21.6.0-py2.py3-none-any.whl (13 kB) Installing collected packages: contextlib2, schema Successfully installed contextlib2-21.6.0 schema-0.7.5 WARNING: You are using pip version 21.1.1; however, version 23.1.2 is available. You should consider upgrading via the 'C:\Program Files\Python38\python.exe -m pip install --upgrade pip' command.
Enterキーを押すと、インストールが開始され、上記のように「Successfully installed」と表示されます。これが表示されれば、schemaが正常にインストールされたことになりますが、「WARNING」と表示されました。「WARNING」はエラーではなく警告で、インストールは行われているので、今回は一旦無視しています。
なお、今回はschemaのバージョン0.7.5をインストールしました。
コメント