conda create -n gee python=3.8
conda install or pip install
xxxxxxxxxx
conda install -c conda-forge earthengine-api
using conda-forge command may crash your env, be careful!
https://developers.google.com/earth-engine/guides/python_install-conda#windows_6
xxxxxxxxxx
pip install earthengine-api
set global proxy and authenticate
xxxxxxxxxx
set http_proxy=socks5://127.0.0.1:10808
set https_proxy=socks5://127.0.0.1:10808
xxxxxxxxxx
ee.Authenticate()
Here we use v2ray (vmess) to proxy GEE
caution!
you can not use 10808 (your v2ray port) to proxy GEE, if you do that it will throw a error in GEE and v2ray:
xxxxxxxxxx
ProxyError: ('Cannot connect to proxy.', RemoteDisconnected('Remote end closed connection without response'))
xxxxxxxxxx
v2ray.com/core/proxy/socks: unknown Socks version xx
you must use "your port + 1" to proxy GEE:
xxxxxxxxxx
import os
os.environ['HTTP_PROXY'] = 'socks5://127.0.0.1:10809'
os.environ['HTTPS_PROXY'] = 'socks5://127.0.0.1:10809'