Hello World (Hard)This is the example we are going to implement here.Hello World (Hard) If you are intimidated by "Hard", try this easy version first, Hello World (Easy) then come back to here when you feel ready 1. Get the codeHello World (Hard)2. Find and read the README.txt file CAREFULLY!Read everything carefully BEFORE you start doing anything! NOTE: the dependencies are listed at the bottom of the README file.You need to take care of those first! (That tripped me up!)
Let's deal with the dependencies together:
Installation of Dependenciesoauth2client
Earth Engine API (if not already installed) * follow the instructions at: Earth Engine API
httplib2
pycrypto (even if already installed installed) * download from https://www.dlitz.net/software/pycrypto/
3. Download the Google App Engine SDK (this will also download the appcfg.py file)App Engine Launcher4. Set your Python pathsMake sure that the app_engine libraries are in your python path.In the .bashrc (linux)/.bash_profile(OSX) that is located in your home directory:
Make sure to source the script to set the environment variable.
5. Create a project at the consoleConsoleThe id generated is the one you need to add to the app.yaml file as “application” 6A. Launching with SDK in local environmentMake sure the correct python version is used by LauncherGo to Launcher preferences Set python path to the desired python version (>=2.7). In my case it is /opt/local/bin/python2.7
!!!!PRESS ENTER -- otherwise the choice will be ignored, this is a bug in the GUI!!Now upload your app into the launcher: File --> Add Existing Application Press the green Run button (piciture here) Check the Logs for errors and if none encountered Press the Browse button OR6B. Launching from command-line in local environmentRun the appfcg.py command like this. The appcfg.py script is part of google_appengine so can be found under the google_appengine install directory (in my case: /usr/local/google_appengine/appcfg.py) Add the path to appfcg.py to your PYTHONPATH
NOTE: user your google mail address (not your EE account email!) and the this email addresses password on prompt.OR pre-assign your email address like this:
And enter password
7A. Deploying on appspot.com with SDK
In your config file, modified the last 4 lines:
Click on the "Deploy" button in the top right corner of the SDK GUIGo to OR 7B. Deploying on appspot.com from command line
View your app athttp://your-app-id.appspot.com |