pyodbc的cx_freeze错误 [英] cx_freeze error with pyodbc
本文介绍了pyodbc的cx_freeze错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果您有一个简单的程序名称pyodbcTest.py
if you have a simple program name pyodbcTest.py
import pyodbc
print "pass"
然后使用cx_freeze对其进行编译
and then use cx_freeze to compile it
cxfreeze --targe-dir=cxTest pyodbcTest.py
然后运行该程序将引发以下错误。
and then run that program it throws the following error.
C:\temp\pythonWork\cxTest>pyodbcTest.exe
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\cx_Freeze\initscripts\Console.py", line 27, in <module>
exec code in m.__dict__
File "pyodbcTest.py", line 1, in <module>
RuntimeError: Unable to import decimal
有什么想法吗?
推荐答案
我必须添加选项--include-module十进制来解决该问题。不确定为什么在冻结过程中无法独自找到一个,但现在可以正常工作
I had to add the option --include-module decimal to solve the problem. Not sure why it could not find that one on its own during the freeze process, but its working now
这篇关于pyodbc的cx_freeze错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文