2011-04-06 20 views
1

我正在通過buildout爲Z MYSQL Databae連接安裝ZMYSQLDA。在Windows上使用Plone 4.0.4時遇到ZMySQLDb問題

這裏是我最初的定義:

parts= 
    ..... 
    zmysqlda 


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

這似乎確定,並建立實例和現場工作。

有關信息我已經安裝MySQL_python通過exe文件,所以我能夠導入MySQLdb。

當我在產品中引入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 

回答

2

它試圖安裝mysql-python的,因爲你已經安裝了一個不上擴建的PYTHONPATH。

我會從刪除[zmysqlda]部分中的'target ='選項開始。這些天你真的不應該指着什麼'productdistros'。這可能只是在'target'找不到zmysqlda的依賴關係。如果這樣不能解決問題,請使用-vv選項重新運行構建,並在此處發佈結果。

但是,只要你使用sqlalchemy,爲什麼不使用SQLAlchemyDA呢?然後你只需要添加Products.SQLAlchemyDA(和MySql的數據庫適配器 - 我推測你已經對sqlalchemy有了)到egg列表中,並且你不需要任何對應[zmysqlda]部分的東西。

+0

非常感謝。我現在可以看到SQL adapeter連接MySQL。我的意圖是使用SQLAlchemy來使用MYSQL表用戶進行身份驗證和角色來決定權限。雖然我已經安裝了它,但我無法看到在acl_user文件夾中添加任何明顯的方法。我已經安裝pas.plugins.sqlalchemy 0.2,但不能看到明顯的地方配置數據庫表。 – WEBBYFOX 2011-04-06 15:06:24

+0

發佈一個關於pas.plugins.sqlalchemy的單獨問題 - 我現在正在處理代碼,並且應該能夠提供幫助。 – Auspex 2011-04-06 16:20:58

+0

它在這裏http://stackoverflow.com/questions/5569963/varchar-requires-a-length-when-rendered-on-mysql – WEBBYFOX 2011-04-06 16:44:17