콘솔워크

[Python pyinstaller] exe 윈도우 실행 파일 만들기 본문

프로그래밍/python

[Python pyinstaller] exe 윈도우 실행 파일 만들기

콘솔워크 2021. 2. 2. 16:26
반응형

 

1. pyinstaller 설치

pip 명령오로 pyinstaller를 설치한다.

pip install pyinstaller

2. 명령어실행

설치후에 윈도우 실행파일을 만들고자하는 파일명을 입력한다.

pyinstaller -w -F [파일명]

pyinstaller -w -F 3_simpyeongwon-kakao.py

-w 와 -F는 옵션값이다. 

-F, --onefile Create a one-file bundled executable.
-w, --windowed, --noconsole
  Windows and Mac OS X: do not provide a console window for standard i/o. On Mac OS X this also triggers building an OS X .app bundle. On Windows this option will be set if the first script is a ‘.pyw’ file. This option is ignored in *NIX systems.

3. 결과확인

입력하고 나면 dist 폴더에 exe파일이 만들어진다.

관련 강의

공식문서

pyinstaller.readthedocs.io/en/stable/usage.html

 

Using PyInstaller — PyInstaller 4.2 documentation

Making GNU/Linux Apps Forward-Compatible Under GNU/Linux, PyInstaller does not bundle libc (the C standard library, usually glibc, the Gnu version) with the app. Instead, the app expects to link dynamically to the libc from the local OS where it runs. The

pyinstaller.readthedocs.io

 

반응형