创建环境
conda create -n gee python=3.8
1.配置GEE
conda activate gee
conda install google-api-python-client
"""————————————————————————————
遇到问题:
The following packages are not available from current channels
解决方案:
conda config --append channels conda-forge
————————————————————————————"""
conda install earthengine-api
conda install pycryptodome
2. 配置geemap
conda install -c conda-forge geemap
conda install -c conda-forge mamba
mamba install -c conda-forge pygis
3..装jupyter notebook 加内核
conda install jupyter
conda install ipykernel
python -m ipykernel install --user --name gee --display-name "gee"
_____________________________________________________________________________
注意:在运行代码时要保证科学上网开的模式是全局代理
在jupyter notebook上进行验证
import ee
import geemap
import os
os.environ['HTTP_PROXY'] = 'http://127.0.0.1:7890' #最后的7890是我自己的代理端口,要替换
os.environ['HTTPS_PROXY'] = 'http://127.0.0.1:7890'
ee.Authenticate()
ee.Initialize(project='generate01')#这里单引号里面的替换成自己的
这个project我是在google cloud 中找到的
都能运行成功说明配置好了
做例子再测试一下
Map=geemap.Map()
Map
参考:https://blog.csdn.net/KnightAIBO/article/details/124158956