본문 바로가기
  • 2025 아오모리 핫코다산 스키
프로그래밍/파이썬

cx_Freeze package 나 module 추가 법

by 안또 2018. 5. 22.

cf_Freeze 를 사용할 때, 개인적으로 만든 패키지가 추가가 안되서 실행이 보통 안될겁니다.
아래 처럼
includes = [...] 에다가 개발자 분이 추가한 pacakge 명을 넣어주시면 됩니다.

from cx_Freeze import setup, Executable # Dependencies are automatically detected, but it might need # fine tuning. buildOptions = dict(packages = ["sys","os"], excludes = [], includes = ["gui.consolewindows", "gui.controlwindows", "gui.imageview", "gui.testview", "multiprocessing.pool", ]) import sys base = None if sys.platform=='win32' else None executables = [ Executable('run.py', base=base) ] setup( name='pytool', version = '0.1', description = 'pytool @seonghun.chung', options = dict(build_exe = buildOptions), executables = executables )