2
Py2exe는 예외없이 실행 파일을 빌드합니다. 내가 실행 파일을 실행하면, 로그 파일은 다음 생성됩니다 : 나는 파이썬 쉘, 이클립스, 또는 Geany에서 프로그램을 실행하면py2exe 실행 파일이 로그 파일 오류를 생성합니다.
Traceback (most recent call last):
File "ecm2es_gui.py", line 10, in <module>
File "weblogin.pyo", line 4, in <module>
File "mechanize\__init__.pyo", line 122, in <module>
File "mechanize\_mechanize.pyo", line 14, in <module>
File "mechanize\_html.pyo", line 19, in <module>
File "mechanize\_form.pyo", line 64, in <module>
ImportError: No module named inspect
나는 오류를 얻을 그것은 확인을 실행합니다.
나는 Mechanize 나 달걀 설치에 문제가 있다고 생각했지만 지금은 이것이 문제라고 생각하지 않습니다.
아이디어가 있으십니까? 이 목록에을 검사
이from distutils.core import setup
import py2exe
import sys; sys.argv.append('py2exe')
includes = []
excludes = ['_ssl', 'pdb', 'unittest', 'inspect',
'pyreadline', 'difflib', 'doctest', 'locale',
'optparse', 'pickle', 'calendar', '_gtkagg',
'_tkagg', 'bsddb', 'curses', 'email', 'pywin.debugger',
'pywin.debugger.dbgcon', 'pywin.dialogs']
packages = []
dll_excludes = []
setup(
options = {"py2exe": {"compressed": 1,
"optimize": 2,
"bundle_files": 3,
"includes": includes,
"excludes": excludes,
"packages": packages,
"dll_excludes": dll_excludes,
"dist_dir": "dist",
"xref": False,
"skip_archive": False,
"ascii": False,
"custom_boot_script": '',
}
},
# zipfile = None,
name='EnerSave Uploader',
version='0.5',
description='Upload ECM-1240 Data to EnerSave',
author='Brad Norman',
windows=[{"script":"ecm2es_gui.py",
"icon_resources": [(1, "favicon.ico")]}
]
)
py2exe 설치 스크립트는 어떻게 생겼습니까? bundle_files에 대해 무엇을 사용하고 있으며 include에 대해 무엇을 설정 했습니까? –
'inspect '는 제외 목록에 있습니까? 제거하면 어떻게됩니까? 기계화 가져 오기에서 * py2exe에에서 생성 된 실행 파일이 작동 을 : 가져 오기에 을 기계화 : –
내가 코드를 변경해야 함을 깨달았다 포함되어있는 setup.py하는 ... 등, 일정을 검사 추가 한 후! 멍청한 실수. – Verohomie