pip install pyinstaller
python your_script.py
pyinstaller --onefile <your_script_name>.py
pyinstaller의 옵션은 다양하지만 보통 쓰이는 옵션은 몇 개 안된다.
-F
,--onefile
: 최종 출력으로 exe파일 하나만 생성한다.-w
,--windowed
: 콘솔 창이 출력되지 않게한다.-i
,--icon
: exe파일의 아이콘을 지정한다.
더 자세한 설명과 옵션들은 아래의 이미지 참고.
추가 경로 필요시>>
pyinstaller --onefile --windowed --icon=heart.ico --clean -p C:\test main.py
난 아래껄 쓸예정,
pyinstaller --onefile --strip <your_script_name>.py
출처2 : https://medium.com/dreamcatcher-its-blog/making-an-stand-alone-executable-from-a-python-script-using-pyinstaller-d1df9170e263
출처2 : https://winterj.me/pyinstaller/
'서버 > Python' 카테고리의 다른 글
10 Minutes from pandas to Koalas on Apache Spark (0) | 2020.05.07 |
---|---|
couchdb basic tutorial (0) | 2020.04.26 |
tistory api access token 얻는 방법 (0) | 2020.04.25 |
gsm bts using rasberry pi 3 (0) | 2019.03.04 |
pwn basic in python (0) | 2018.12.11 |