Python freshly reinstalled to C:\Program Files\Python39, everything done as administrator, installed for all users, added to PATH. Error in installing pyinstaller. My Windows username contains the character á (0xe1 in ANSI), which is being misinterpreted as being in utf8 instead of ANSI, whence error. There is no sitecustomize.py in my file system. Microsoft Windows [Version 10.0.19041.572] (c) 2020 Microsoft Corporation. All rights reserved. C:\WINDOWS\system32>python Python 3.9.0 (tags/v3.9.0:9cf6752, Oct 5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> exit() C:\WINDOWS\system32>python -V Python 3.9.0 C:\WINDOWS\system32>py -m pip install --upgrade pip Requirement already up-to-date: pip in c:\program files\python39\lib\site-packages (20.2.4) C:\WINDOWS\system32>py -m pip install pyinstaller Collecting pyinstaller Using cached pyinstaller-4.0.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:\Program Files\Python39\python.exe' 'C:\Program Files\Python39\lib\site-packages\pip\_vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\CIARND~1\AppData\Local\Temp\tmpm0upp60n' cwd: C:\Users\Ciarán Ó Duibhín\AppData\Local\Temp\pip-install-jw1e9dw4\pyinstaller Complete output (38 lines): Error in sitecustomize; set PYTHONVERBOSE for traceback: SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xe1 in position 0: unexpected end of data (sitecustomize.py, line 21) running dist_info creating C:\Users\Ciarán Ó Duibhín\AppData\Local\Temp\pip-modern-metadata-48slrgbm\pyinstaller.egg-info writing C:\Users\Ciarán Ó Duibhín\AppData\Local\Temp\pip-modern-metadata-48slrgbm\pyinstaller.egg-info\PKG-INFO writing dependency_links to C:\Users\Ciarán Ó Duibhín\AppData\Local\Temp\pip-modern-metadata-48slrgbm\pyinstaller.egg-info\dependency_links.txt writing entry points to C:\Users\Ciarán Ó Duibhín\AppData\Local\Temp\pip-modern-metadata-48slrgbm\pyinstaller.egg-info\entry_points.txt writing requirements to C:\Users\Ciarán Ó Duibhín\AppData\Local\Temp\pip-modern-metadata-48slrgbm\pyinstaller.egg-info\requires.txt writing top-level names to C:\Users\Ciarán Ó Duibhín\AppData\Local\Temp\pip-modern-metadata-48slrgbm\pyinstaller.egg-info\top_level.txt writing manifest file 'C:\Users\Ciarán Ó Duibhín\AppData\Local\Temp\pip-modern-metadata-48slrgbm\pyinstaller.egg-info\SOURCES.txt' reading manifest file 'C:\Users\Ciarán Ó Duibhín\AppData\Local\Temp\pip-modern-metadata-48slrgbm\pyinstaller.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no files found matching 'pyinstaller-gui.py' 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' no previously-included directories found matching '.github' warning: no previously-included files found matching '.*' warning: no previously-included files found matching '*.yml' warning: no previously-included files found matching '*~' warning: no previously-included files found matching '.directory' warning: no previously-included files matching '*.py[co]' found anywhere in distribution writing manifest file 'C:\Users\Ciarán Ó Duibhín\AppData\Local\Temp\pip-modern-metadata-48slrgbm\pyinstaller.egg-info\SOURCES.txt' creating 'C:\Users\Ciarán Ó Duibhín\AppData\Local\Temp\pip-modern-metadata-48slrgbm\pyinstaller.dist-info' error: invalid command 'bdist_wheel' ---------------------------------------- ERROR: Command errored out with exit status 1: 'C:\Program Files\Python39\python.exe' 'C:\Program Files\Python39\lib\site-packages\pip\_vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\CIARND~1\AppData\Local\Temp\tmpm0upp60n' Check the logs for full command output. C:\WINDOWS\system32> C:\WINDOWS\system32>