1
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
4

2 に答える 2

0

まだ行っていない場合は、この行import MySQLdbをファイルに追加してください。dev_appserver.py

于 2013-03-04T06:34:58.273 に答える