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:
JavaScript
x
35
35
1
┌──(root㉿kali)-[~/.wine/drive_c/Python27/Scripts]
2
└─# wine ~/.wine/drive_c/Python27/python.exe -m pip install pyinstaller
3
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrt
4
Collecting pyinstaller
5
Using cached https://files.pythonhosted.org/packages/9e/ed/fbdad7f5d8f794c901076b814b8z
6
Installing build dependencies done
7
Getting requirements to build wheel error
8
ERROR: Command errored out with exit status 1:
9
command: 'C:Python27python.exe' 'C:Python27libsite-packagespip_vendorpep517_'
10
cwd: c:usersroottemppip-install-87e3zrpyinstaller
11
Complete output (19 lines):
12
Traceback (most recent call last):
13
File "C:Python27libsite-packagespip_vendorpep517_in_process.py", line 207, in>
14
main()
15
File "C:Python27libsite-packagespip_vendorpep517_in_process.py", line 197, inn
16
json_out['return_val'] = hook(**hook_input['kwargs'])
17
File "C:Python27libsite-packagespip_vendorpep517_in_process.py", line 54, in l
18
return hook(config_settings)
19
File "c:usersroottemppip-build-env-fbjbxmoverlayLibsite-packagessetuptoolsbl
20
return self._get_build_requires(config_settings, requirements=['wheel'])
21
File "c:usersroottemppip-build-env-fbjbxmoverlayLibsite-packagessetuptoolsbs
22
self.run_setup()
23
File "c:usersroottemppip-build-env-fbjbxmoverlayLibsite-packagessetuptoolsbp
24
self).run_setup(setup_script=setup_script)
25
File "c:usersroottemppip-build-env-fbjbxmoverlayLibsite-packagessetuptoolsbp
26
exec(compile(code, __file__, 'exec'), locals())
27
File "setup.py", line 63
28
file=sys.stderr)
29
^
30
SyntaxError: invalid syntax
31
----------------------------------------
32
ERROR: Command errored out with exit status 1: 'C:Python27python.exe' 'C:Python27lib.
33
WARNING: You are using pip version 19.2.3, however version 20.3.4 is available.
34
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
35
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:
JavaScript
1
2
1
python.exe -m pip install pyinstaller==3.6
2