Python Pip 安装失败 - 无法构建蛋。也不能使用 1.2.5 因为 google 云 sql
Python Pip Install fails - Could not build the egg. Also cannot use 1.2.5 because of google cloud sql
我需要mysql-python.
安装 1.2.4 时出现 could not build egg 的错误
到处都说安装 1.2.5,这也适用于我。
但是 googleAppEngine 的 app.yaml 只支持 1.2.4
libraries:
- name: MySQLdb
version: "1.2.4"
所以如果我在那里使用 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.
应该做什么,使用 App 引擎或使用 1.2.4 pip 都可以!
运行 -
pip卸载mysql-python
YAML -
libraries:
- name: MySQLdb
version: "1.2.4"
设置 -
'default': {
'ENGINE':'django.db.backends.mysql',
'HOST':'/cloudsql/ProjectName:DBName',
'NAME': 'my_database',
'USER': 'root',
'PASSWORD': '********',
}
运行 pip install --upgrade setuptools
然后尝试 pip install mysql-python
我需要mysql-python.
安装 1.2.4 时出现 could not build egg 的错误 到处都说安装 1.2.5,这也适用于我。
但是 googleAppEngine 的 app.yaml 只支持 1.2.4
libraries:
- name: MySQLdb
version: "1.2.4"
所以如果我在那里使用 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.
应该做什么,使用 App 引擎或使用 1.2.4 pip 都可以!
运行 -
pip卸载mysql-python
YAML -
libraries:
- name: MySQLdb
version: "1.2.4"
设置 -
'default': {
'ENGINE':'django.db.backends.mysql',
'HOST':'/cloudsql/ProjectName:DBName',
'NAME': 'my_database',
'USER': 'root',
'PASSWORD': '********',
}
运行 pip install --upgrade setuptools
然后尝试 pip install mysql-python