在Windows上使用Plone 4.0.4在ZMySQLDb上遇到问题

时间:2011-04-06 11:06:51

标签: mysql plone buildout

我正在通过buildout为Z MYSQL Databae连接安装ZMYSQLDA。

以下是我的初步定义:

parts=
     .....
     zmysqlda


[zmysqlda]
recipe = cns.recipe.zmysqlda
target = ${productdistros:location}

看起来没问题,确实构建了实例和网站。

有关我已经安装了MySQL_python通过exe文件的信息,所以我可以导入MySQLdb。

当我在egg中引入Products.ZMySQLDA时,它试图获取MYSQL-python。我不明白为什么因为它已经安装好了。

Buidout日志

Unused options for buildout: 'eggs' 'download-directory'.
Updating productdistros.
Installing instance.
Getting distribution for 'MySQL-python==1.2.3'.
install_dir C:\Program Files\Plone 404/buildout-cache/eggs\tmparsmo9
error: The system cannot find the file specified
An error occured when trying to install MySQL-python 1.2.3. Look above this mess
age for any errors that were output by easy_install.
While:
  Installing instance.
  Getting distribution for 'MySQL-python==1.2.3'.
Error: Couldn't install: MySQL-python 1.2.3
*************** PICKED VERSIONS ****************
[versions]
collective.saconnect = 1.3
pas.plugins.sqlalchemy = 0.2
products.ploneboard = 2.2
products.ploneboardsubscription = 0.2
products.zmysqlda = 3.1.1
sqlalchemy = 0.6.6

#Required by:
#collective.saconnect 1.3
plone.app.z3cform = 0.5.3

#Required by:
#collective.saconnect 1.3
rwproperty = 1.0

#Required by:
#pas.plugins.sqlalchemy 0.2
z3c.saconfig = 0.12

#Required by:
#pas.plugins.sqlalchemy 0.2
zope.sqlalchemy = 0.6.1

1 个答案:

答案 0 :(得分:2)

它正在尝试安装mysql-python,因为你已经安装的那个不在buildout的PYTHONPATH上。

我首先要删除[zmysqlda]部分中的'target ='选项。这些天你真的不应该在'productdistros'上指点任何东西。可能只是buildout无法在'target'中找到zmysqlda的依赖项。如果这不能解决问题,请使用 -vv 选项重新运行buildout并在此处发布结果。

但是,只要你正在使用sqlalchemy,为什么不使用适合它的SQLAlchemyDA ......?然后你只需要将Products.SQLAlchemyDA(以及MySql数据库适配器 - 我认为你已经为sqlalchemy设置了)添加到egg列表中,并且你不需要与[zmysqlda]部分相对应的任何内容。

相关问题