| Issue 305: | Unable to import decimal with py2exe generated Executable | |
| 1 person starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem? I generated a executable using py2exe on a windows machine. However, the generated executable fails to execute with the error indicated below. D:\ScannerTool\dist>SerialTool.exe Traceback (most recent call last): File "SerialTool.py", line 2, in <module> File "pyodbc.pyc", line 12, in <module> File "pyodbc.pyc", line 10, in __load RuntimeError: Unable to import decimal I am running on Windows XP SP3 32 Bit. I read on the link http://www.py2exe.org/index.cgi/PyODBC that by including an additional option, i can get around this error but despite having generated the executable with this option, the error persists. Appreciate your help on this. Here is my setup.py for reference. from distutils.core import setup import py2exe , sys from glob import glob sys.path.append('C:\\WINDOWS\\WinSxS\\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.6195_x-ww_44262b86') #setup(options = {"py2exe": { "dll_excludes": ["OCI.dll"],"includes": "decimal"}},) setup(options = {"py2exe": {"includes": "decimal"}},) setup(console=['SerialTool.py']) Regards, Anurag
Jan 9, 2013
#1
Anu...@mimansa.cl
Mar 28, 2013
(No comment was entered for this change.)
Status:
NoFix
Sep 15, 2014
The option simply needs to be added to same call to setup, eg:
setup(
console=['setup.py'],
options={"py2exe": {"includes": "decimal"}}
)
|