Compile |
exe로 컴파일 (pyinstaller 이용) - 컴파일 옵션홍사훈 0건 369회 20-02-01 15:10 |
---|
관련링크
본문
실행 파일 압축 여부 -F/-D 옵션 (라이브러리 포함 시킴)
* d:\python> python.exe pyinstaller.exe -w -F compile.py
한개의 파일로 실행 파일로 생성 (실행시 임시폴더에 압축을 푼뒤 실행)
* d:\python> python.exe pyinstaller.exe -w -D compile.py
여러개의 파일과 실행파일이 생성됨 (압축되지 않아 폴더내 파일 모두 필요함)
옵션
—onefile : 실행 파일 안에 python36.dll도 포함 (-F 옵션도 동일기능)
—windowed : 실행시 콘솔창이 출력되지 않도록 설정 (-w 옵션도 동일기능)
—icon : 실행 파일 아이콘 넣기
ex) \> pyinstaller --icon=icon.ico compile.py
--hidden-import : 모듈추가
ex) \> pyinstaller --hidden-import=module_name compile.py
ex) \> pyinstaller --hidden-import=module_name, --hidden-import=module_name compile.py
등록된 댓글이 없습니다.