#author("2022-07-11T16:28:18+09:00","default:Miyashita","Miyashita") #author("2022-07-13T14:07:32+09:00","default:Miyashita","Miyashita") *GEE Python API [#e3188394] **Ubuntu 上での準備 [#x55b1d58] 下のように GCloud を有効にして認証する. #codeprettify{{ echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - sudo apt-get update && sudo apt-get install google-cloud-sdk sudo apt-get install google-cloud-sdk-app-engine-java google-cloud-sdk-app-engine-python google-cloud-sdk-app-engine-python-extras gcloud init earthengine authenticate }} ~ **python3.10 のエラー回避 [#be987700] #codeprettify{{ earthengine asset info users/username/assets_id }} で assets の情報を確認できるのだが,こうすると #codeprettify{{ AttributeError: module 'collections' has no attribute 'Callable' }} というエラーが出た.どうやら python3.10 だとこうなるらしい.ちゃんと確認していないので真相は不明.~ collections.Callable は collections.abc.Callable になっているので, #codeprettify{{ /home/miyashita/.local/lib/python3.10/site-packages/httplib2shim/__init__.py }} の中の collections.Callable を書き換えた. #codeprettify{{ #if isinstance(proxy_info, collections.Callable): if isinstance(proxy_info, collections.abc.Callable): }} **earthengine スクリプト [#n98118ff] [[Command Line Tool>https://developers.google.com/earth-engine/guides/command_line]] に色々書いてある.