ImportError: libjpeg.so.62: cannot open shared object file: No such file or directory
Turns out all you need to do is
sudo apt-get install libjpeg62
You can test this by starting python and doing:
import _imaging
Getting stuff done using open source tools.
ImportError: libjpeg.so.62: cannot open shared object file: No such file or directory
sudo apt-get install libjpeg62
import _imaging
sudo apt-get install git python-setuptools
sudo yum install git python-setuptools
sudo port install git python-setuptools
sudo easy_install pip sudo pip install virtualenv virtualenvwrapper
export WORKON_HOME=$HOME/Projects export VIRTUALENVWRAPPER_HOOK_DIR=$HOME/.virtualenvs export VIRTUALENVWRAPPER_LOG_DIR=$HOME/.virtualenvs source /usr/local/bin/virtualenvwrapper.sh git config --global user.name "Terse Col" git config --global user.email myemail@gmail.com git config --global http.sslVerify false
mkdir $HOME/.virtualenvs source $HOME/.bashrc mkvirtualenv mynewproject cdvirtualenv
PROJ=gae_project
mkvirtualenv ${PROJ}
cdvirtualenv
Note that note that "--no-site-packages" and "--distribute" are now the defaults for mkvirtualenv. You don't even need to use "--python=python2.7" on Ubuntu 12.10.GAE=1.7.4
wget -O /tmp/gae.zip http://googleappengine.googlecode.com/files/google_appengine_${GAE}.zip
unzip /tmp/gae.zip
GAE_APP_NAME=dummy mkdir -p gae_app/staticNow create the app.yaml file:
echo """application: ${GAE_APP_NAME}
version: development
runtime: python27
api_version: 1
threadsafe: true
default_expiration: 7d
handlers:
- url: /static
static_dir: static
- url: .*
script: wsgi_app.app
""" > gae_app/app.yaml
echo """import webapp2
class MainPage(webapp2.RequestHandler):
def get(self):
self.response.headers['Content-Type'] = 'text/plain'
self.response.out.write('Please replace me with a decent WSGI App Framework such as Flask')
app = webapp2.WSGIApplication([('/', MainPage)],
debug=True)
""" > gae_app/wsgi_app.py
python ./google_appengine/dev_appserver.py gae_app/
//negaredemo/demos/demos/app.pyand be aware that when you change the code you need to restart the development server (Ctrl-C stops it.)
http://localhost:8080/demos/You'll notice immediately that we're not using a templating language here, but rather the built in Domain Specific Language (DSL). In reality you would use the DSL to build xhtml snippets and then use meld to insert them into templates. I've not used meld before, but it looks very straight forward - neat in fact. Now onto example2.
http://localhost:8080/demos/Counter?value=7


