0

I need mysql-python.

I get error of could not build egg while installing 1.2.4 Everywhere it says install 1.2.5, which works for me too.

But googleAppEngine's app.yaml supports only 1.2.4

libraries:
- name: MySQLdb
  version: "1.2.4"

So if I use 1.2.4 there, and 1.2.5 in the virtual env, I get the error -

ImproperlyConfigured: Error loading MySQLdb module: this is MySQLdb version (1, 2, 5, 'final', 1), but _mysql is version (1, 2, 4, 'final', 1)
    1:1430668397.857531 This request caused a new process to be started for your application, and thus caused your application code to be loaded for the first time. This request may thus take longer and use more CPU than a typical request for your application.

What is supposed to be done, either working with App engine or with 1.2.4 pip will do!

Kakshil Shah
  • 111
  • 6

2 Answers2

0

Currently Google App Engine SDK 1.9.18 supports the third-party library MySQLdb version 1.2.4. Therefore you should have MySQL-python 1.2.4 installed for the proper execution of your application in your local dev environment. You may edit your app.yaml file to always use the latest version of MySQLdb supported by App Engine by changing the line of code version: “1.2.4” to version: "latest" under your MySQLdb library declaration.

Jordan
  • 301
  • 2
  • 8
0

Latest didn't help.

This worked -- Run -

pip uninstall mysql-python

YAML - 
    libraries:
    - name: MySQLdb
      version: "1.2.4"

Settings -

'default': {
    'ENGINE':'django.db.backends.mysql',
    'HOST':'/cloudsql/ProjectName:DBName',
    'NAME': 'my_database',
    'USER': 'root',
    'PASSWORD': '********',

}

Kakshil Shah
  • 111
  • 6