cx_Freeze를 사용하여 Python의 hello world 프로그램을 Linux의 독립 실행 형 바이너리/패키지로 컴파일하려고합니다. 나 cx_Freeze를 실행하면 오류없이 완료하지만 난이 (가) 실행 파일 생성 실행하려고 할 때, 나는 오류 주어진 오전 :Python 2.7 Cx_Freeze : ImportError : No module __startup__
ImportError: No module named __startup__
내 setup.py 파일은 다음과 같습니다
from cx_Freeze import setup, Executable
# Dependencies are automatically detected, but it might need
# fine tuning.
buildOptions = dict(packages = [], excludes = [])
base = 'Console'
executables = [
Executable('test.py', base=base)
]
setup(name='test',
version = '1.0',
description = '',
options = dict(build_exe = buildOptions),
executables = executables)
그리고 그것은이다 다음과 같이 실행하십시오.
python setup.py build
왜 이런 일이 발생하는지 혼란 스럽습니다. ImportError가 라이브러리에 대한 것이라면 이해할 수 있습니다. 그러나 __startup__
은 나에게 익숙하지 않습니다.
감사합니다.
\ __ startup__은 cx_Freeze가 응용 프로그램을 시작하는 데 사용하는 모듈입니다. 당신이 사용하고있는 test.py의 내용을 제공 할 수 있습니까? cx_Freeze 배포판에서 간단한 예제를 사용할 수 있습니까? 아니면 같은 오류가 발생합니까? –
아마도 [cx_freeze' 버그 추적기의 버그] (https://github.com/anthony-tuininga/cx_Freeze/issues/209). 가상 환경에서 실행 중이라면? – ShadowRanger