C
C
Coder 14482020-06-14 15:40:57
Python
Coder 1448, 2020-06-14 15:40:57

How to solve error when running pyinstaller-script.py?

When compiling:

pyinstaller -F test.py
Cannot open C:\Users\?????\AppData\Local\Programs\Python\Python38-32\Scripts\pyinstaller-script.py


When opening pyinstaller-script.py:
Traceback (most recent call last):
  File "C:\Users\Артём\AppData\Local\Programs\Python\Python38-32\Scripts\pyinsta
ller-script.py", line 5, in <module>
    from pkg_resources import load_entry_point
  File "C:\Users\Артём\AppData\Local\Programs\Python\Python38\lib\site-packages\
pkg_resources\__init__.py", line 3251, in <module>
    def _initialize_master_working_set():
  File "C:\Users\Артём\AppData\Local\Programs\Python\Python38\lib\site-packages\
pkg_resources\__init__.py", line 3234, in _call_aside
    f(*args, **kwargs)
  File "C:\Users\Артём\AppData\Local\Programs\Python\Python38\lib\site-packages\
pkg_resources\__init__.py", line 3263, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "C:\Users\Артём\AppData\Local\Programs\Python\Python38\lib\site-packages\
pkg_resources\__init__.py", line 583, in _build_master
    ws.require(__requires__)
  File "C:\Users\Артём\AppData\Local\Programs\Python\Python38\lib\site-packages\
pkg_resources\__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "C:\Users\Артём\AppData\Local\Programs\Python\Python38\lib\site-packages\
pkg_resources\__init__.py", line 786, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'PyInstaller==3.6' distribution was not
found and is required by the application


Here's what's in pyinstaller-script.py itself:
# EASY-INSTALL-ENTRY-SCRIPT: 'PyInstaller==3.6','console_scripts','pyinstaller'
__requires__ = 'PyInstaller==3.6'
import re
import sys
from pkg_resources import load_entry_point

if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
    sys.exit(
        load_entry_point('PyInstaller==3.6', 'console_scripts', 'pyinstaller')()
    )


As I understood the error is in this line:
from pkg_resources import load_entry_point

My Python:
Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:20:19) [MSC v.1925 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>


My pkg_resources.pyi: https://drive.google.com/file/d/1pMYeyZAApcMweGijk...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Timur Pokrovsky, 2020-06-14
@wows15

Most likely the problem is due to the Cyrillic alphabet in the path to pyinstaller-script.py

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question