1.1 RuntimeError: Unable to import decimal

解决方法:

options = {
        'py2exe': {
            'includes': 'decimal',
            },
        }
参考文章:http://www.py2exe.org/index.cgi/PyODBC
1.2 在2003环境中不能运行:
安装runtime c++ 2008解决问题。vcredist_x86.exe
1.3 py2exe 配置文件
from distutils.core import setup
import glob
import py2exe
includes = ["encodings", "encodings.*","pyodbc","decimal"]
options = {"py2exe":
{   "compressed": 1,
"optimize": 2,
"includes": includes,
"bundle_files": 3
}
}
setup(
version = "0.1.0",
description = "hello",
name = "hello",
options=options,
# zipfile=None,
console=["mdbaccess.py"]
)