1. Authentication/Access
Follow the instructions below to set up your service account.
2.Installing the Earthengine API (Python)2.1 Install anacondaAnaconda helps you install and manage python and other packages. Anaconda is cool and helps manage dependencies between packages! Get the latest anaconda version2.2 Configure conda to use conda-forgeconda update conda conda config --add channels conda-forge 2.3 Install the pip package managerThe earthengine api can only be installed with pip (and not with anaconda). That's why we need pip on top of anaconda conda install pip 2.4 Install the earthengine apipip install earthengine-api 2.5 Test the installationpython import ee ee.Initialize() Install the Google App Engine SDKApp Engine SDK DownloadsNote: The Python SDK does not contain the Launcher anymore. You will need to dev_appserver.py run on localhost and deploy to the appsot server. If you are on MAC, you get install the App Engine SDK via the PHP SDK instead. That will give you the launcher as well as the dev_appserver commandline utility. Creating a conda environment for Earthengine APIThis will allow you to create your own python environment with versions of python packages that match the versions on the app engine server. in the example below we creat the env ee-env. It will be installed by conda in $(PATH_TO_ANACONDA_INSTALLATION)/envs conda create -n ee-env python=2.7 source activate ee-env Now that you have set up this basic python env, you will need to install some packages there that Earthengine needs in this environment conda install httplib2 oauth2client jinja2 cryptography numpy=1.6.2 pip install earthengine-api To use the Launcher with this environment, make sure the python path in the lunacher is set correctly: go to GoogleAppEngineLauncher--> Preferences --> Python Path. Enter $(PATH_TO_ANACONDA_INSTALLATION)/envs/ee-env/bin/python2.7. Make sure to hit Enter for the changes to take effect If you are using dev_appserver.py from the commandline, make sure that you sourced the environment before running it: source ee-env Set up the Hello World projectQuickstart for Python App Engine Standard EnvironmentSetting up project librariesAlternatively, you can set up your own library ($(PROJECT_DIR)/ee-lib) directly in the project directory and install earthengine-api there. This should help you avoid version differences between your local machine and the appengine server. It also was the only way I could take care of the oauth2client issue I ran into the last time I installed the EE software. This issue is described here and also here cd $(PROJECT_DIR) pip install earthengine-api -t ./ee-lib Create or modify the appengine_config.py and add these lines: from google.appengine.ext import vendor vendor.add('ee-lib') You may need to install pycrypto again and you may need to revert back to an earlier version of oauth2client. pip install pycrypto -t ./ee-lib pip install oauth2client==1.5.2 -t ./ee-lib |