在將tinyerp-server-4.2.3編譯在我的Windows XP平台上,一般用python setup.py install好像是不能產生.exe的執行檔,後來改用python setup.py py2exe一開始就發生了這個錯誤:
File “C:Python25Libsite-packagespy2exemf.py”, line 217, in load_tail
raise ImportError, “No module named ” + mname
ImportError: No module named xml.xpath
喔喔!少了個xml.path模組,上Google找了一下,Orz,在http://sourceforge.net/projects/pyxml/的網站上出現了這樣一句話:
PyXML is no longer maintained.
果真沒有找到python 2.5用的,哇勒,TinyERP的手冊上還說用Python 2.5執行ㄝ,而且看tinyerp-server-setup-4.2.3.exe,確實也是用python 2.5的,在討論區中看到這一篇ImportError: cannot import name xpath,還有setup.py中有這樣一行:
options = {“py2exe”: {
“compressed”: 0,
“optimize”: 2,
“packages”: [“decimal”, “xml”, “xml.dom”, “xml.xpath”, “encodings”,”mx.DateTime”,”wizard”,”pychart”,”PIL”, “pyparsing”, “pydot”],
“excludes” : [“Tkconstants”,”Tkinter”,”tcl”],
}}
看來這個問題,openerp應該要正視了,為了要能夠編譯只好先下載這個來用:http://www.burgaud.com/wordpress/wp-content/uploads/pyxml-084win32-py25.exe
這下好了,繼續產生新的錯誤:
File “C:Python25Libsite-packagespy2exemf.py”, line 204, in find_head_pack
age
raise ImportError, “No module named ” + qname
ImportError: No module named pydot
這個問題明天再來解決!