Skip to content

Instantly share code, notes, and snippets.

@avalanchy
Last active December 22, 2015 02:28
Show Gist options
  • Save avalanchy/6403608 to your computer and use it in GitHub Desktop.
Save avalanchy/6403608 to your computer and use it in GitHub Desktop.
Google App Engine and Virtualenv (Python 2.7)

Lets download SDK to /tmp. I assume that Virtualenv is already installed.

  1. Unpack
unzip /tmp/google_appengine_<VERSION>.zip -d /usr/local
  1. Create Virtualenv
virtualenv ~/demo
  1. Add path
printf '/usr/local/google_appengine \nimport dev_appserver; dev_appserver.fix_sys_path()' > ~/demo/lib/python2.7/site-packages/gae.pth
  1. Activate Virtualenv
. ~/demo/bin/activate
  1. Validate
python -c "import yaml;print yaml.__path__"
  1. This should print this
['/usr/local/google_appengine/lib/yaml-<VERSION>/yaml']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment