카테고리 보관물: Python Etc

Python 미분류 라이브러리나 모듈 관련 자료

Python – PyInstaller 실행파일 만들기

Python – PyInstaller

  • .exe 실행 파일 생성
  • python 2.x : py2exe 사용
  • python 3.x PyInstaller 사용

PyInstaller

Download

Installation

  • Release 3.3: stable, supports Python 2.7, 3.3–3.6
pip install pyinstaller

upgrade to a newer version:

pip install --upgrade pyinstaller

Using PyInstaller

  • CMD 또는 Terminal 에서 실행
pyinstaller test.py

옵션 –onefile

  • 하나의 실행 파일로 만들기
pyinstaller --onefile test.py

옵션 –noconsole

  • GUI(Graphic User Interfase) 프로그램 실행 시 Console 창 안뛰우는 옵션
pyinstaller --noconsole --onefile test.py

생성 파일 확인

  • build 파일과 dist 폴더 생성됨
  • dist 폴더에서 exe 파일 확인