GEEMAP简介
https://geemap.org/
https://book.geemap.org/
Geemap适用于希望利用 Python 生态系统的各种库和工具来探索 Google 地球引擎的学生和研究人员。它还专为希望从 GEE JavaScript API 过渡到 Python API 的现有 GEE 用户而设计。Geemap 提供交互式图形用户界面,无需编写任何代码即可将 GEE JavaScript 转换为 Python 脚本。通过提供一个简单的界面来探索和可视化 Earth Engine 数据集,它可以为用户节省大量时间和精力。
报错内容
To authorize access needed by Earth Engine, open the following URL in a web browser and follow the instructions:
https://code.earthengine.google.com/client-auth?scopes=https%3A//www.googleapis.com/auth/earthengine%20https%3A//www.googleapis.com/auth/devstorage.full_control&request_id=bQm4Bx7rUMroifyBKGOpuGTywQd2t_kiJ_n85MjJPJM&tc=Pcu-fCmbnLmAWPbS1LzsbsYZqGunkLqFHxZozTQeBjY&cc=JN0vi1ShyINnL8swTj08ZnzX3grXFl8BU89LI34ZWkM
The authorization workflow will generate a code, which you should paste in the box below.
Enter verification code: 4/1A*********hveQ
FileNotFoundError Traceback (most recent call last)
File A:\ProgramData\Anaconda3\envs\gee\lib\site-packages\ee\data.py:221, in get_persistent_credentials()
220 try:
--> 221 return Credentials(None, **oauth.get_credentials_arguments())
222 except IOError:
File A:\ProgramData\Anaconda3\envs\gee\lib\site-packages\ee\oauth.py:74, in get_credentials_arguments()
73 def get_credentials_arguments():
---> 74 with open(get_credentials_path()) as creds:
75 stored = json.load(creds)
如图
解决方案
解决方案1
根据自己电脑的代理地址
和端口号
,在jupyter notebook
中设置
# method 1: 设置代理
import os
os.environ['HTTP_PROXY'] = 'http://127.0.0.1:8880'
os.environ['HTTPS_PROXY'] = 'http://127.0.0.1:8880'
或者
# method 2:设置代理
geemap.set_proxy(port=8880)
解决方案2
如果这样还是报错,如下图所示
那么就需要设置电脑的系统环境变量
此时,已经可以正常运行了
完美解决!