Mountain Lion上没有Google AppEngine'rdbms API'

时间:2012-08-03 14:26:35

标签: python mysql google-app-engine

python 
Python 2.7.2 (default, Jun 20 2012, 16:23:33) 
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import MySQLdb

命令行上的一切顺利,但我仍然在appengine日志中得到以下内容

*** Running dev_appserver with the following flags:
    --admin_console_server= --port=8080
Python command: /usr/bin/python2.7
INFO     2012-08-03 14:15:31,002 py_zipimport.py:148] zipimporter('/Library/Python/2.7/site-packages/MySQL_python-1.2.3-py2.7-macosx-10.8-intel.egg', 'MySQLdb/')
WARNING  2012-08-03 14:15:31,096 rdbms_mysqldb.py:74] The rdbms API is not available because the MySQLdb library could not be loaded.
WARNING  2012-08-03 14:15:31,183 datastore_file_stub.py:518] Could not read datastore data from /var/folders/mc/45jr0vk5217fmpl18jn3vgx40000gn/T/dev_appserver.datastore
WARNING  2012-08-03 14:15:31,188 dev_appserver.py:3498] Could not initialize images API; you are likely missing the Python "PIL" module. ImportError: No module named _imaging
INFO     2012-08-03 14:15:31,194 dev_appserver_multiprocess.py:647] Running application dev~appexp87 on port 8080: http://localhost:8080
INFO     2012-08-03 14:15:31,194 dev_appserver_multiprocess.py:649] Admin console is available at: http://localhost:8080/_ah/admin

2 个答案:

答案 0 :(得分:2)

您是否尝试使用CloudSQL?如果没有,不要担心rdbms API警告,该行是无害的。 PIL警告也是如此。

您不应该收到有关无法读取数据存储文件的警告。它可能是文件权限的问题,或者文件可能以某种方式被破坏。如果他们没有必要的数据,请尝试清除数据存储文件并再次尝试。

答案 1 :(得分:0)

请将此行import MySQLdb添加到dev_appserver.py文件中,如果您尚未这样做的话。