Google Maps Platform用のPythonクライアントライブラリ「googlemaps」のインストールについて解説します。
googlemaps(https://github.com/googlemaps/google-maps-services-python)は、Google Maps Platform用のPythonクライアントです。
■Python
今回のPythonのバージョンは、「3.8.5」を使用しています。(Windows10)(pythonランチャーでの確認)
■googlemapsをインストールする
googlemapsをインストールを行いますが、今回はpipを経由してインストールを行うので、まずWindowsのコマンドプロンプトを起動します。
pip install googlemaps
起動後、上記のコマンドを入力し、Enterキーを押します。
なお、今回は、pythonランチャーを使用しており、Python Version 3.8.5にインストールを行うために、pipを使う場合にはコマンドでの切り替えを行います。
py -3.8 -m pip install googlemaps
切り替えるために、上記のコマンドを入力し、Enterキーを押します。
Defaulting to user installation because normal site-packages is not writeable Collecting googlemaps Downloading googlemaps-4.6.0.tar.gz (31 kB) Preparing metadata (setup.py) ... done Requirement already satisfied: requests<3.0,>=2.20.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from googlemaps) (2.25.1) Requirement already satisfied: certifi>=2017.4.17 in c:\users\user_\appdata\roaming\python\python38\site-packages (from requests<3.0,>=2.20.0->googlemaps) (2021.5.30) Requirement already satisfied: chardet<5,>=3.0.2 in c:\users\user_\appdata\roaming\python\python38\site-packages (from requests<3.0,>=2.20.0->googlemaps) (4.0.0) Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\user_\appdata\roaming\python\python38\site-packages (from requests<3.0,>=2.20.0->googlemaps) (1.26.5) Requirement already satisfied: idna<3,>=2.5 in c:\users\user_\appdata\roaming\python\python38\site-packages (from requests<3.0,>=2.20.0->googlemaps) (2.10) Building wheels for collected packages: googlemaps Building wheel for googlemaps (setup.py) ... done Created wheel for googlemaps: filename=googlemaps-4.6.0-py3-none-any.whl size=38552 sha256=56e5c4033957a7e1408cc49e9b41d7dda39c502a525f43cf9fdfb642a302e9a0 Stored in directory: c:\users\user_\appdata\local\pip\cache\wheelsd\e9\ee6c1792ed04efbf4fe9c89662d701f5c1f1fdddf8782951d3 Successfully built googlemaps Installing collected packages: googlemaps Successfully installed googlemaps-4.6.0
Enterキーを押すと、インストールが開始され、上記のように「Successfully installed」と表示されます。これが表示されれば、googlemapsが正常にインストールされたことになります。
なお、今回はgooglemapsのバージョン4.6.0をインストールしました。
コメント