I've installed MySQLdb successfully for my system python -- and I've added the library to app.yaml as well, but the dev-appserver does not recognize it. I've followed the tutorial here: https://developers.google.com/appengine/docs/python/cloud-sql/
I downloaded and installed the latest Python mysql from here:
http://sourceforge.net/projects/mysql-python/
sudo CFLAGS=-Qunused-arguments CPPFLAGS=-Qunused-arguments python setup.py build
sudo CFLAGS=-Qunused-arguments CPPFLAGS=-Qunused-arguments python setup.py install
If I run python from the Command Line I can happily import MySQLdb
Here's what I have in app.yaml:
libraries:
- name: webapp2
version: "2.5.2"
- name: jinja2
version: "2.6"
- name: MySQLdb
version: "1.2.4b4"
Here's the exception I get when I try to open a page hosted by my appengine dev server.
ERROR 2014-05-15 20:23:19,480 wsgi.py:262]
Traceback (most recent call last):
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py", line 239, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py", line 298, in _LoadHandler
handler, path, err = LoadObject(self._handler)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py", line 84, in LoadObject
obj = __import__(path[0])
File "xxxx/main.py", line 10, in <module>
import MySQLdb
ImportError: No module named MySQLdb
Any help would be deeply appreciated -- the tutorial isn't working. Thanks for your generosity and kindness!
-s