zoukankan      html  css  js  c++  java
  • GEE windows 环境配置

    参照GEE开发大神的一篇文章GEE学习笔记 三十五:windows下配置本地开发环境 - 无形的风的文章 - 知乎

    按他的顺序下来还是出了点问题,再整理一下自己遇到的问题。

    1、安装Google的 python API 的客户端

    pip install google-api-python-client

    2、安装鉴权验证依赖库

    pip install pyCrypto(我运行后发现之前已经装过了,所以没有实际效果)

    3、安装GEE的python库

    pip install earthengine-api

    4、初始化GEE的API,同时验证你的GEE账户

    python -c "import ee; ee.Initialize()"

    第一次运行这个命令会得到系统提示的错误信息,因为我们还没有验证我们的GEE账户,所以我们需要运行下面的命令:

    earthengine authenticate

    (没有遇到缺少oauth2client的错误,但是复制过来验证码后连接超时,需要设置梯子为全局模式)

    5、运行他的例子报错WinError10060,连接中断

    ee.Initialize() 失败

    按他说的解决方法失败,用户名是英文的

    解决方案:https://www.shicj.top/post/GEE%E7%8E%AF%E5%A2%83%E9%85%8D%E7%BD%AEWinError10060%E9%94%99%E8%AF%AF

    # Import the Earth Engine Python Package
    import ee
    
    import os
    
    # update the proxy settings
    # os.environ['HTTP_PROXY'] = 'my_proxy_id:proxy_port'
    # os.environ['HTTPS_PROXY'] = 'my_proxy_id:proxy_port'
    os.environ['HTTP_PROXY'] = 'http://127.0.0.1:1080'
    os.environ['HTTPS_PROXY'] = 'http://127.0.0.1:1080'
    
    # Initialize the Earth Engine object, using the authentication credentials.
    ee.Initialize()

    成功!所以正确解决方法是改一下端口设置,但每次运行都要在前面加上这些代码,梯子的全局和PAC模式都可以。

    ---------------- 坚持每天学习一点点
  • 相关阅读:
    js 判断是否包含
    react-navigation-easy-helper
    mobx 小结
    react native使用 mobx , can't find variable:Symbol
    react-native 极光推送(jpush-react-native)
    react-native 启动页(react-native-splash-screen)
    react-native Android 全面屏手机 底部留有一大块黑屏
    RAP + MOCK
    ES7新特性
    POP动画[2]
  • 原文地址:https://www.cnblogs.com/tccbj/p/11237286.html
Copyright © 2011-2022 走看看