반응형
1. pyinstaller 설치하기
pip install pyinstaller
2. 실행파일 만들기
pyinstaller sample.py
2-1 실행파일 옵션
콘솔창 출력되지 않도록하기 (-w)
pyinstaller -w sample.py
실행파일 하나만 생성하기
pyinstaller -w -F sample.py
3. 실행파일이 자동으로 꺼지는 형상 Debugging
Traceback (most recent call last):
File "PyInstaller\loader\pyiboot01_bootstrap.py", line 167, in __init__
File "ctypes\__init__.py", line 381, in __init__
FileNotFoundError: Could not find module 'libusb-1.0.dll' (or one of its dependencies). Try using the full path with constructor syntax.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "main.py", line 5, in <module>
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "PyInstaller\loader\pyimod03_importers.py", line 540, in exec_module
File "usb1\__init__.py", line 61, in <module>
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "PyInstaller\loader\pyimod03_importers.py", line 540, in exec_module
File "usb1\libusb1.py", line 183, in <module>
File "usb1\libusb1.py", line 157, in _loadLibrary
File "PyInstaller\loader\pyiboot01_bootstrap.py", line 169, in __init__
__main__.PyInstallerImportError: Failed to load dynlib/dll 'libusb-1.0.dll'. Most probably this dynlib/dll was not found when the application was frozen.
[16644] Failed to execute script main
에러
반응형
'파이썬' 카테고리의 다른 글
파이썬 라이브러리 추가하기 (기본) (0) | 2021.06.23 |
---|---|
Pyinstaller , PyQt Ui 파일 포함해서 Build 하기 (0) | 2021.06.21 |
<파이썬 기초> 튜플 타입 (Tuple Type) (0) | 2021.04.20 |
<파이썬 기초> 변수명을 만들 때 규칙 (0) | 2021.04.20 |
<파이썬 기초> import sys ? 왜 사용할까? 기본적인 파이썬 모듈 (0) | 2021.04.17 |