kshnkvn
kshnkvn

Reputation: 966

Why is there an error installing the pyinstaller?

I tried to install the pyinstaller with the command pip install pyinstaller and got an error:

C:\Users\kshnk>pip install pyinstaller
Collecting pyinstaller
  Downloading https://files.pythonhosted.org/packages/e2/c9/0b44b2ea87ba36395483a672fddd07e6a9cb2b8d3c4a28d7ae76c7e7e1e5/PyInstaller-3.5.tar.gz (3.5MB)
     |████████████████████████████████| 3.5MB 2.2MB/s
  Installing build dependencies ... error
  ERROR: Command errored out with exit status 1:
   command: 'c:\python37\python.exe' 'c:\python37\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\kshnk\AppData\Local\Temp\pip-build-env-11qk42u_\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel
       cwd: None
  Complete output (24 lines):
  Traceback (most recent call last):
    File "c:\python37\lib\runpy.py", line 193, in _run_module_as_main
      "__main__", mod_spec)
    File "c:\python37\lib\runpy.py", line 85, in _run_code
      exec(code, run_globals)
    File "c:\python37\lib\site-packages\pip\__main__.py", line 16, in <module>
      from pip._internal import main as _main  # isort:skip # noqa
    File "c:\python37\lib\site-packages\pip\_internal\__init__.py", line 40, in <module>
      from pip._internal.cli.autocompletion import autocomplete
    File "c:\python37\lib\site-packages\pip\_internal\cli\autocompletion.py", line 8, in <module>
      from pip._internal.cli.main_parser import create_main_parser
    File "c:\python37\lib\site-packages\pip\_internal\cli\main_parser.py", line 7, in <module>
      from pip._internal.cli import cmdoptions
    File "c:\python37\lib\site-packages\pip\_internal\cli\cmdoptions.py", line 24, in <module>
      from pip._internal.models.search_scope import SearchScope
    File "c:\python37\lib\site-packages\pip\_internal\models\search_scope.py", line 11, in <module>
      from pip._internal.utils.misc import normalize_path, redact_password_from_url
    File "c:\python37\lib\site-packages\pip\_internal\utils\misc.py", line 58, in <module>
      from typing import cast, Tuple
    File "c:\python37\lib\site-packages\typing.py", line 1356, in <module>
      class Callable(extra=collections_abc.Callable, metaclass=CallableMeta):
    File "c:\python37\lib\site-packages\typing.py", line 1004, in __new__
      self._abc_registry = extra._abc_registry
  AttributeError: type object 'Callable' has no attribute '_abc_registry'
  ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\python37\python.exe' 'c:\python37\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\kshnk\AppData\Local\Temp\pip-build-env-11qk42u_\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel Check the logs for full command output.

OS: Windows 10 ver 1903

Python 3.7.3

Upvotes: 2

Views: 9321

Answers (5)

Mohamed Raza
Mohamed Raza

Reputation: 983

run CMD as administrator and then run the following command on cmd will install successfully

pip install pyinstaller

Upvotes: 0

user3621864
user3621864

Reputation: 1

I downloaded the wheel file from https://www.lfd.uci.edu/~gohlke/pythonlibs/

pip install path_to_download.whl

pip install pyinstaller==4.0 --no-build-isolation

Upvotes: 0

Naresh Kumar
Naresh Kumar

Reputation: 499

Issue resolved using below installation

i had similar issue. but below installion worked and it install all the dependence!!!

pip install pyinstaller==4.0 --no-build-isolation

Upvotes: 4

Abdeslem SMAHI
Abdeslem SMAHI

Reputation: 453

try downloading the wheel file of pyinstaller from

https://www.lfd.uci.edu/~gohlke/pythonlibs/

then do

pip install filename.whl

Upvotes: 7

R4444
R4444

Reputation: 2114

Notice that the error comes from typing.py.

Upgrading typing module will solve this issue:

pip install -U typing

or:

pip install --upgrade typing

Otherwise try removing the package.

Upvotes: 2

Related Questions