【问题标题】:Initialize Google Earth Engine API with a proxy server使用代理服务器初始化 Google Earth Engine API
【发布时间】:2019-03-28 02:03:25
【问题描述】:

认证后,地球引擎API通过Initialize()函数成功连接服务器。

import ee
ee.Initialize()

但是,一旦我开始使用代理服务器,初始化就会失败并产生以下错误。

TimeoutError: [WinError 10060] A connection attempt failed because the 
connected party did not properly respond after a period of time, or 
established connection failed because connected host has failed to respond

我尝试过修改IPython notebook服务器环境

import os
os.environ['HTTP_PROXY'] = 'my_proxy_id:proxy_port'
os.environ['HTTPS_PROXY'] = 'my_proxy_id:proxy_port'

ee 库仍然无法与服务器连接。如何更新代理设置?

【问题讨论】:

    标签: anaconda jupyter-notebook google-earth-engine


    【解决方案1】:

    对于windows10,在控制台中写下你的代理信息如下:

    > set http_proxy='my_proxy_id:proxy_port'
    > set https_proxy='my_proxy_id:proxy_port'
    

    然后进入python环境,检查ee.Initialize():

    > python
    >>> import ee
    >>> ee.Initialize()
    

    如果没有错误打印出来,那么代理设置是好的。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-10-25
      • 2016-04-28
      • 2012-10-11
      • 1970-01-01
      • 2020-10-09
      • 2018-07-07
      • 1970-01-01
      相关资源
      最近更新 更多