目录
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再安装