기록과 정리의 공간

[Python] pyinstaller 설치 에러 해결 본문

언어/Python

[Python] pyinstaller 설치 에러 해결

딸기맛도나쓰 2020. 6. 28. 23:08

에러 내용

pip install pyinstaller을 이용해 pyinstaller를 설치하려고 했으나 다음과 같은 에러가 발생했다.

Collecting pyinstaller
  Using cached PyInstaller-3.6.tar.gz (3.5 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\python\python38\python.exe' 'c:\python\python38\lib\site-packages\pip\_vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\최재연\AppData\Local\Temp\tmpik_hiz_w'
         cwd: C:\Users\mine\AppData\Local\Temp\pip-install-rfrds3qi\pyinstaller
    Complete output (36 lines):
    running dist_info
    creating C:\Users\mine\AppData\Local\Temp\pip-modern-metadata-9ep1te55\PyInstaller.egg-info
    writing C:\Users\mine\AppData\Local\Temp\pip-modern-metadata-9ep1te55\PyInstaller.egg-info\PKG-INFO        
    writing dependency_links to C:\Users\mine\AppData\Local\Temp\pip-modern-metadata-9ep1te55\PyInstaller.egg-info\dependency_links.txt
    writing entry points to C:\Users\mine\AppData\Local\Temp\pip-modern-metadata-9ep1te55\PyInstaller.egg-info\entry_points.txt
    writing requirements to C:\Users\mine\AppData\Local\Temp\pip-modern-metadata-9ep1te55\PyInstaller.egg-info\requires.txt
    writing top-level names to C:\Users\mine\AppData\Local\Temp\pip-modern-metadata-9ep1te55\PyInstaller.egg-info\top_level.txt
    writing manifest file 'C:\Users\mine\AppData\Local\Temp\pip-modern-metadata-9ep1te55\PyInstaller.egg-info\SOURCES.txt'
    reading manifest file 'C:\Users\mine\AppData\Local\Temp\pip-modern-metadata-9ep1te55\PyInstaller.egg-info\SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    Error in sitecustomize; set PYTHONVERBOSE for traceback:
    SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xc3 in position 0: invalid continuation byte (sitecustomize.py, line 21)
    no previously-included directories found matching 'bootloader\build'
    no previously-included directories found matching 'bootloader\.waf-*'
    no previously-included directories found matching 'bootloader\.waf3-*'
    no previously-included directories found matching 'bootloader\waf-*'
    no previously-included directories found matching 'bootloader\waf3-*'
    no previously-included directories found matching 'bootloader\_sdks'
    no previously-included directories found matching 'bootloader\.vagrant'
    warning: no previously-included files found matching 'bootloader\.lock-waf*'
    no previously-included directories found matching 'doc\source'
    no previously-included directories found matching 'doc\_build'
    warning: no previously-included files matching '*.tmp' found under directory 'doc'
    warning: no files found matching 'news\_template.rst'
    no previously-included directories found matching 'news'
    no previously-included directories found matching 'old'
    no previously-included directories found matching 'scripts'
    no previously-included directories found matching 'tests\scripts'
    warning: no previously-included files found matching '.*'
    warning: no previously-included files found matching '*~'
    warning: no previously-included files found matching '.directory'
    writing manifest file 'C:\Users\mine\AppData\Local\Temp\pip-modern-metadata-9ep1te55\PyInstaller.egg-info\SOURCES.txt'
    creating 'C:\Users\mine\AppData\Local\Temp\pip-modern-metadata-9ep1te55\PyInstaller.dist-info'
    error: invalid command 'bdist_wheel'
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\python\python38\python.exe' 'c:\python\python38\lib\site-packages\pip\_vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\mine\AppData\Local\Temp\tmpik_hiz_w' Check the logs for full command output.

해결 방법

답변을 읽어보니 pip버전이 문제인 것 같았다.pip버전 19에서 발생하는 오류이므로 pip버전18.1downgrade하라는 내용이었다. pip --version으로 현재 pip버전을 확인해보니 아래와 같아서,

pip 20.1.1 from c:\python\python38\lib\site-packages\pip (python 3.8)

pip install pip==18.1downgradepyinstaller를 설치하니 문제 없이 설치가 됐다!

(참고> pip 다시 최신 버전으로 업그레이드 : python -m pip install --upgrade pip)

Comments