1

我想使用 mysql form ploneformgen,但我无法构建 plone。

构建日志http://pastie.org/5345272.js

Getting required 'MySQL-python>=1.2.1'
  required by Products.ZMySQLDA 3.1.1.
We have no distributions for MySQL-python that satisfies 'MySQL-python>=1.2.1'.
Getting distribution for 'MySQL-python>=1.2.1'.
Running easy_install:
/usr/local/Plone/Python-2.6/bin/python "-c" "from setuptools.command.easy_install import main; main()" "-mUNxd" "/usr/local/Plone/zeocluster/../buildout-cache/eggs/tmpDSODu0" "-Z" "/usr/local/Plone/buildout-cache/downloads/dist/MySQL-python-1.2.4c1.zip"
path=/usr/local/Plone/buildout-cache/eggs/distribute-0.6.21-py2.6.egg

Processing MySQL-python-1.2.4c1.zip
Running MySQL-python-1.2.4c1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-gFbWLf/MySQL-python-1.2.4c1/egg-dist-tmp-16g1TE
The required version of distribute (>=0.6.28) is not available,
and can't be installed while this script is running. Please
install a more recent version first, using
'easy_install -U distribute'.

(Currently using distribute 0.6.19 (/usr/local/Plone/Python-2.6/lib/python2.6/site-packages/distribute-0.6.19-py2.6.egg))
error: Setup script exited with 2
An error occured when trying to install MySQL-python 1.2.4c1. Look above this message for any errors that were output by easy_install.
While:
  Installing client1.
  Getting distribution for 'MySQL-python>=1.2.1'.
Error: Couldn't install: MySQL-python 1.2.4c1
*************** PICKED VERSIONS ****************
[versions]
Products.PloneFormGen = 1.7.1
Products.ZMySQLDA = 3.1.1
collective.classifieds = 1.6
plone.app.ldap = 1.2.8
quintagroup.dropdownmenu = 1.2.5
quintagroup.pfg.captcha = 1.0.5
zettwerk.ui = 1.1.1

构建配置http://pastie.org/5345300

一些链接:

http://blog.mysqlboy.com/2010/08/installing-mysqldb-python-module.html

http://plone.293351.n2.nabble.com/Plone-amp-MySQL-No-quot-Z-MYSQL-Database-Connection-quot-from-ZMI-td5487160.html

4

2 回答 2

2

看来 MySQLdb egg 需要更新版本的distribute

The required version of distribute (>=0.6.28) is not available,

(Currently using distribute 0.6.19 (/usr/local/Plone/Python-2.6/lib/python2.6/site-packages/distribute-0.6.19-py2.6.egg))

先升级你的distribute蛋;例如,如果您使用的是统一安装程序,versions.cfg请固定版本。如果是这样,请编辑versions.cfg以更正那里的版本号:

[versions]
...
# Buildout infrastructure
...
distribute = 0.6.28
于 2012-11-08T11:55:14.600 回答
1

虽然您对特定问题有一个非常好的答案,但我强烈建议您忘记 ZMySQLDA 并使用 SQLAlchemyDA,它可以让您通过单个产品访问 SQLAlchemy 支持的任何数据库(我已经使用了所有 MySQL、PostGreSQL、Oracle、SQLServer) ,并且得到更好的支持。

于 2012-11-11T02:15:56.397 回答