linux打开Anaconda图形化界面
anaconda-navigator
配置环境
conda create -n geo python=3.8
conda activate geo
conda install geemap -c conda-forge
conda install jupyter_contrib_nbextensions -c conda-forge
jupyter contrib nbextension install --user
进入到创建好的虚拟环境中(geo)
su root # 输入密码进入root用户
conda activate geo #进入创建的虚拟环境
jupyter notebook #启动notebook
在notebook中使用全局代理,并设施好端口号!!!
# method 1: 设置代理
import os
os.environ['HTTP_PROXY'] = 'http://127.0.0.1:7880'
os.environ['HTTPS_PROXY'] = 'http://127.0.0.1:7880'
如果地图还是不能正确显示,在终端: ,并重启笔记
conda activate geo
jupyter nbextension install --py --symlink --sys-prefix ipyleaflet
jupyter nbextension enable --py --sys-prefix ipyleaflet