配置的主要步骤如下:
1. 安装python环境:建议安装 发行版anaconda,采用其包管理器 conda,管理各种包,例如 6S包。当然也可以自行配置6S包,不过比较麻烦
2. pip install earthengine-api
3. 认证(需要科学上网)
import ee # 注意需要设置本地代理服务器的端口,打开科学上网软件后,需要找到本地代理的端口号,如10809 set http_proxy=http://127.0.0.1:10809 set https_proxy=http://127.0.0.1:10809 # 上一步设置好后,运行下面的步骤,即可注册成功! ee.Authenticate() ee.Initialize()
参考: https://developers.google.com/earth-engine/guides/python_install