Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing pyinstaller gives an error message

Tags:

python

C:\Windows\system32>pip install pyinstaller
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Collecting pyinstaller
  Using cached https://files.pythonhosted.org/packages/03/32/0e0de593f129bf1d1e77eed562496d154ef4460fd5cecfd78612ef39a0cc/PyInstaller-3.4.tar.gz
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  Complete output from command c:\python27\python.exe c:\python27\lib\site-packages\pip\_vendor\pep517\_in_process.py get_requires_for_build_wheel c:\users\goldp\appdata\local\temp\tmpz9mkmy:
  Traceback (most recent call last):
    File "c:\python27\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 207, in <module>
      main()
    File "c:\python27\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 197, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "c:\python27\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 54, in get_requires_for_build_wheel
      return hook(config_settings)
    File "c:\users\user\appdata\local\temp\pip-build-env-oljevt\overlay\Lib\site-packages\setuptools\build_meta.py", line 115, in get_requires_for_build_wheel
      return _get_build_requires(config_settings, requirements=['wheel'])
    File "c:\users\user\appdata\local\temp\pip-build-env-oljevt\overlay\Lib\site-packages\setuptools\build_meta.py", line 101, in _get_build_requires
      _run_setup()
    File "c:\users\user\appdata\local\temp\pip-build-env-oljevt\overlay\Lib\site-packages\setuptools\build_meta.py", line 85, in _run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 20, in <module>
      from PyInstaller import __version__ as version, HOMEPATH, PLATFORM
  ImportError: No module named PyInstaller

Command "c:\python27\python.exe c:\python27\lib\site-packages\pip\_vendor\pep517\_in_process.py get_requires_for_build_wheel c:\users\user\appdata\local\temp\tmpz9mkmy" failed with error code 1 in c:\users\user\appdata\local\temp\pip-install-yd3kml\pyinstaller

This is the specific error message I receive. I am not sure why this is? This is from using pip install pyinstaller and all 3 commands advised below.

like image 787
goldpill Avatar asked Jan 24 '19 09:01

goldpill


4 Answers

Downgrading pip also did not work for me. Installing from conda worked well. Try - 'conda install -c conda-forge pyinstaller'

like image 141
NikhilKV Avatar answered Oct 18 '22 12:10

NikhilKV


This is caused by an issue in pip 19. The only fix at the moment is to downgrade to pip 18.1:

$ pip install pip==18.1
$ pip --version
pip 18.1 from ...\lib\site-packages\pip (python 3.7)

Then you can install pyinstaller 3.4:

$ pip install pyinstaller
Collecting pyinstaller
  Using cached https://files.pythonhosted.org/packages/03/32/0e0de593f129bf1d1e77eed562496d154ef4460fd5cecfd78612ef39a0cc/PyInstaller-3.4.tar.gz
[...]
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
[...]
Successfully built pyinstaller
Installing collected packages: pyinstaller
Successfully installed pyinstaller-3.4
like image 8
VoodooBoot Avatar answered Nov 02 '22 23:11

VoodooBoot


The exact issue:

Getting requirements to build wheel ... error

The answer by Philip Belemezov is working for me. Below is the reproduction of the issue and the working solution in screenshots form for you to understand better.

Issue

Solution

  1. pip install pip==18.1 - Run the command prompt as an Admin and it will install the pip version 18.1 for you as shown below.

pip install 18.1

  1. pip install pyinstaller - Run this command now and it will install the module:pyinstaller as shown below.

command to install the pyinstaller

  1. Last step is to type pyinstaller in your command and if the output is similar then that means you have successfully installed the package:pyinstaller.

pyinstaller installed successfully

like image 3
Amninder Singh Avatar answered Nov 02 '22 21:11

Amninder Singh


I have got the same issue and tried a lot of ways got from internet but below worked for me

  1. Open Command Prompt as administrator
  2. Downgrade pip to version 18.1 pip install pip==18.1
  3. Download pyinstaller version 3.4 pip install pyinstaller==3.4
  4. Success, This should work. Verify installation using pyinstaller -v
like image 2
NADIRSHA Avatar answered Nov 02 '22 23:11

NADIRSHA