0

我正在尝试使用 Python Tools for Visual Studio 在 Visual Studio 2012 中构建和运行 OpenERP 服务器。

目前我收到超过 2300 条错误消息,主要是:

unexpected token 'x1'

我已经下载了 openerp-server-6.0.4 源代码,并从 VS 中的现有 Python 代码项目创建了一个新的 Python 项目。我在提示时选择了 OpenERP 源 (C:\OpenERP\Bin) 的路径,按下 F5 时要执行的文件是 openerp-server.py。我选择了 Python 64 位 3.3 解释器。

该项目已创建,但即使在构建之前,我也会收到许多意外的令牌错误。例如,在 account.py 文件中,它在以下代码中抱怨意外的令牌“税”:

 tax.type=='code':
            address = address_id and obj_partener_address.browse(cr, uid, address_id) or None
            localdict = {'price_unit':cur_price_unit, 'address':address, 'product':product, 'partner':partner}
            exec tax.python_compute in localdict
            amount = localdict['result']
            data['amount'] = amount

在 Python Interactive 中使用 TOOLS > Python Tools > Execute Project 时,我看到以下结果:

Python 交互式窗口。键入 $help 以获取命令列表。

重置执行引擎

交互窗口尚未启动。

运行 C:\temp\openerp-server-6.0.4\bin\openerp-server.py

回溯(最近一次通话最后):

导入工具中的文件“C:\temp\openerp-server-6.0.4\bin\openerp-server.py”,第 64 行

文件“C:\temp\openerp-server-6.0.4\bin\tools__init__.py”,第 23 行,导入 win32

ImportError:没有名为“win32”的模块

谁能指导我让 OpenERP 使用 VS 构建和运行?甚至可能吗?

谢谢!

4

1 回答 1

0

你必须安装

http://www.py2exe.org/index.cgi/PyOpenGL

请在安装此模块后尝试。

于 2013-03-12T08:10:28.060 回答