Skip to content
Advertisement

Cannot install Pyinstaller under Wine on Kali Linux

I am getting syntax error ERROR: Command errored out with exit status 1 ... while trying to install Pyinstaller under Wine on Kali Linux in a virtual environment

I’m getting an error as follows:

┌──(root㉿kali)-[~/.wine/drive_c/Python27/Scripts]
└─# wine ~/.wine/drive_c/Python27/python.exe -m pip install pyinstaller
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrt
Collecting pyinstaller
  Using cached https://files.pythonhosted.org/packages/9e/ed/fbdad7f5d8f794c901076b814b8z
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:Python27python.exe' 'C:Python27libsite-packagespip_vendorpep517_'
       cwd: c:usersroottemppip-install-87e3zrpyinstaller                            
  Complete output (19 lines):                                                            
  Traceback (most recent call last):                                                     
    File "C:Python27libsite-packagespip_vendorpep517_in_process.py", line 207, in>
      main()                                                                             
    File "C:Python27libsite-packagespip_vendorpep517_in_process.py", line 197, inn
      json_out['return_val'] = hook(**hook_input['kwargs'])                              
    File "C:Python27libsite-packagespip_vendorpep517_in_process.py", line 54, in l
      return hook(config_settings)                                                       
    File "c:usersroottemppip-build-env-fbjbxmoverlayLibsite-packagessetuptoolsbl
      return self._get_build_requires(config_settings, requirements=['wheel'])           
    File "c:usersroottemppip-build-env-fbjbxmoverlayLibsite-packagessetuptoolsbs
      self.run_setup()                                                                   
    File "c:usersroottemppip-build-env-fbjbxmoverlayLibsite-packagessetuptoolsbp
      self).run_setup(setup_script=setup_script)                                         
    File "c:usersroottemppip-build-env-fbjbxmoverlayLibsite-packagessetuptoolsbp
      exec(compile(code, __file__, 'exec'), locals())                                    
    File "setup.py", line 63                                                             
      file=sys.stderr)                                                                   
          ^                                                                              
  SyntaxError: invalid syntax                                                            
  ----------------------------------------                                               
ERROR: Command errored out with exit status 1: 'C:Python27python.exe' 'C:Python27lib.
WARNING: You are using pip version 19.2.3, however version 20.3.4 is available.          
You should consider upgrading via the 'python -m pip install --upgrade pip' command.    

I have python2 version 2.7.18 and python version 3.9.10 installed and pip 22.1.2 from /usr/local/lib/python3.9/dist-packages/pip. I have tried uninstalling and reinstalling Python, Wine but the error doesn’t go away.

Advertisement

Answer

The latest PyInstaller version for Python2.7 is 3.6.
So you need to tell pip which PyInstaller version to install:

...python.exe -m pip install pyinstaller==3.6
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement