I need mysql-python.
我需要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.
我在安装1.2.4时遇到无法生成蛋的错误,它说安装1.2.5,这对我也有用。
But googleAppEngine's app.yaml supports only 1.2.4
但googleAppEngine的app.yaml仅支持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 -
所以如果我在那里使用1.2.4,在虚拟环境中使用1.2.5,我会得到错误 -
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!
应该做什么,无论是使用App引擎还是1.2.4点都可以!
2 个解决方案
#1
Run -
pip uninstall mysql-python
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': '********',
}
#2
run pip install --upgrade setuptools
then try pip install mysql-python
运行pip install --upgrade setuptools然后尝试pip install mysql-python