2024年3月9日发(作者:)

错误加载MySQLdb模块:没有一个名为MySQLdb的模块。

错误加载MySQLdb模块:没有一个名为MySQLdb的模块。

[英]ImproperlyConfigured: Error loading MySQLdb module: No module named

MySQLdb I’m working on a Google App Engine project and have been running into

issues trying to set up the basic Django Admin Site with MySQL. I have searched around

about this question, but all I see people posting about deals with running apps locally. In

my situation, I’m getting an error when running the app in Google App Engine.

 我正在开发一个谷歌应用程序引擎项目,并且一直在尝试用MySQL建立基本的

Django管理站点。我已经搜索了这个问题,但是我看到的所有人都是在本地运行应

用程序。在我的情况下,在谷歌应用程序引擎中运行应用程序时,我遇到了一个错

误。

  To be more specific about the issue, I get the following error in the logs for my

application:

 为了更具体地讨论这个问题,我在我的应用程序日志中有以下错误:

  ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb

This makes it seem like MySQL isn’t even installed, which doesn’t really make sense. It

should be accessible by default in GAE. Is there another issue that I’m not seeing? This is

confusing for me because it doesn’t even give me a specific line to look at, or any kind of

lead.

 这使得MySQL似乎还没有安装,这是没有意义的。在GAE中默认是可访问的。

还有其他问题吗?这让我很困惑,因为它甚至没有给我一个特定的线去看,或者任何

一种线索。

  I’ve looked through the GAE documentation for Django and CloudSQL but nothing I

had seemed out of place. I also took a look at the example Django app and all of my

content didn’t seem to conflict with what they had there.

 我已经查看了Django和CloudSQL的GAE文档,但我没有发现什么地方不合