GmailAPIへのPythonicインターフェース「EZGmail」のインストール

GmailAPIへのPythonicインターフェース「EZGmail」のインストールについて解説しています。

「EZGmail(https://github.com/asweigart/ezgmail)」は、GmailAPIへのPythonicインターフェースで、Githubのページでは「2022年2月の時点」で実際に機能すると表記されている。メールの送信や未読メールを取得等が行える。

■Python

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

■EZGmailをインストールする

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

pip install ezgmail

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

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

py -3.8 -m pip install ezgmail

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

Defaulting to user installation because normal site-packages is not writeable
Collecting ezgmail
Downloading EZGmail-2022.2.24.tar.gz (26 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: google-api-python-client in c:\users\user_\appdata\roaming\python\python38\site-packages (from ezgmail) (2.42.0)
Requirement already satisfied: oauth2client in c:\users\user_\appdata\roaming\python\python38\site-packages (from ezgmail) (4.1.3)
Requirement already satisfied: httplib2<1dev,>=0.15.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from google-api-python-client->ezgmail) (0.19.1)
Requirement already satisfied: google-auth-httplib2>=0.1.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from google-api-python-client->ezgmail) (0.1.0)
Requirement already satisfied: google-api-core!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0,<3.0.0dev,>=1.31.5 in c:\users\user_\appdata\roaming\python\python38\site-packages (from google-api-python-client->ezgmail) (2.7.1)
Requirement already satisfied: uritemplate<5,>=3.0.1 in c:\users\user_\appdata\roaming\python\python38\site-packages (from google-api-python-client->ezgmail) (3.0.1)
Requirement already satisfied: google-auth<3.0.0dev,>=1.16.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from google-api-python-client->ezgmail) (1.32.1)
Requirement already satisfied: six>=1.6.1 in c:\users\user_\appdata\roaming\python\python38\site-packages (from oauth2client->ezgmail) (1.12.0)
Requirement already satisfied: pyasn1-modules>=0.0.5 in c:\users\user_\appdata\roaming\python\python38\site-packages (from oauth2client->ezgmail) (0.2.8)
Requirement already satisfied: rsa>=3.1.4 in c:\users\user_\appdata\roaming\python\python38\site-packages (from oauth2client->ezgmail) (4.7.2)
Requirement already satisfied: pyasn1>=0.1.7 in c:\users\user_\appdata\roaming\python\python38\site-packages (from oauth2client->ezgmail) (0.4.8)
Requirement already satisfied: googleapis-common-protos<2.0dev,>=1.52.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from google-api-core!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0,<3.0.0dev,>=1.31.5->google-api-python-client->ezgmail) (1.53.0)
Requirement already satisfied: requests<3.0.0dev,>=2.18.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from google-api-core!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0,<3.0.0dev,>=1.31.5->google-api-python-client->ezgmail) (2.27.1)
Requirement already satisfied: protobuf>=3.12.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from google-api-core!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0,<3.0.0dev,>=1.31.5->google-api-python-client->ezgmail) (3.17.3)
Requirement already satisfied: setuptools>=40.3.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from google-auth<3.0.0dev,>=1.16.0->google-api-python-client->ezgmail) (62.3.1)
Requirement already satisfied: cachetools<5.0,>=2.0.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from google-auth<3.0.0dev,>=1.16.0->google-api-python-client->ezgmail) (4.2.2)
Requirement already satisfied: pyparsing<3,>=2.4.2 in c:\users\user_\appdata\roaming\python\python38\site-packages (from httplib2<1dev,>=0.15.0->google-api-python-client->ezgmail) (2.4.7)
Requirement already satisfied: charset-normalizer~=2.0.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from requests<3.0.0dev,>=2.18.0->google-api-core!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0,<3.0.0dev,>=1.31.5->google-api-python-client->ezgmail) (2.0.12)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\user_\appdata\roaming\python\python38\site-packages (from requests<3.0.0dev,>=2.18.0->google-api-core!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0,<3.0.0dev,>=1.31.5->google-api-python-client->ezgmail) (2021.10.8)
Requirement already satisfied: idna<4,>=2.5 in c:\users\user_\appdata\roaming\python\python38\site-packages (from requests<3.0.0dev,>=2.18.0->google-api-core!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0,<3.0.0dev,>=1.31.5->google-api-python-client->ezgmail) (3.3)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\user_\appdata\roaming\python\python38\site-packages (from requests<3.0.0dev,>=2.18.0->google-api-core!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0,<3.0.0dev,>=1.31.5->google-api-python-client->ezgmail) (1.26.9)
Building wheels for collected packages: ezgmail
Building wheel for ezgmail (pyproject.toml) ... done
Created wheel for ezgmail: filename=EZGmail-2022.2.24-py3-none-any.whl size=27627 sha256=f8573b82fe4372c18443bf8f5a917a37ed9d929dd4818892328862ff684e6d84
Stored in directory: c:\users\user_\appdata\local\pip\cache\wheelsb17ffc2f63db0396a5808e4545f167252caf8fbe92baf2665
Successfully built ezgmail
Installing collected packages: ezgmail
Successfully installed ezgmail-2022.2.24
WARNING: There was an error checking the latest version of pip.

Enterキーを押すと、インストールが開始され、上記のように「Successfully installed」と表示されます。これが表示されれば、EZGmailが正常にインストールされたことになります。「WARNING」が出力されましたが、警告でありエラーではないので、一旦無視します。

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

コメント

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