一、打包文件内容:
from distutils.core import setup
import py2exe
import sys
#this allows to run it with a simple double click.
sys.argv.append('py2exe')
py2exe_options = {
"includes": ["sip","re","os","xlrd","sys",“chardet","string","PyQt4"],
"dll_excludes": ["MSVCP90.dll",],
"compressed": 1,
"optimize": 2,
"ascii": 0,
"bundle_files": 1,
}
setup(
name = 'AFTNjieyi',
version = '1.0',
windows = ['ui_aftn.py','cs_aftn.py','myDict.py'],
zipfile = None,
options = {'py2exe': py2exe_options}
)
二、程序运行结果:
Traceback (most recent call last):
File "ui_aftn.py", line 10, in <module>
ImportError: No module named chardet
1 个解决方案
#1
exe文件运行时提出没有chardet模块
#1
exe文件运行时提出没有chardet模块