google earth engine python版安装问题

目录

 

安装问题

1.urllib.error.URLError:

2.安装pyCrypto 出现 error: Microsoft Visual C++ 14.0 is required. 


安装问题

1.urllib.error.URLError: <urlopen error [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。>

解决办法:设置shadowsocks小火箭为全局代理模式

如果不成功

在认证之前从命令行设置一下代理,端口号根据你自己的来

(参考 https://blog.csdn.net/lovelyelfpop/article/details/69586366

set http_proxy=http://127.0.0.1:1080
set https_proxy=http://127.0.0.1:1080

上面cmd的代理设置只是临时的,只会坚持到cmd窗口关闭。

在pyCharm中进行gee初始化的时候也会出现网络问题。

使用如下方法解决:

(参考 https://blog.csdn.net/RS_cj/article/details/85008690

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()

# Print the information for an image asset.
image = ee.Image('srtm90_v4')
print(image.getInfo())

2.安装pyCrypto 出现 error: Microsoft Visual C++ 14.0 is required. 

方法一:安装pycryptodome 来代替pyCrypto

方法二:使用anaconda安装,里面能搜到pyCrypto

方法二如果不行,就安装一个visual studio再安装

 

 

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值