On Linux, pyuic4
should be a bash script that would usually be installed as /usr/bin/pyuic4
.
The error
exec /usr/bin/python /usr/lib/python2.7/site-packages/PyQt4/uic/pyuic.py ${1+"$@"}
^
SyntaxError: invalid syntax
would be produced if you attempted to run that bash script with python.
However, the error message also gives the source file location as
File "/usr/lib/python2.7/site-packages/PyQt4/uic/pyuic.py", line 2
which doesn't make much sense, because that should be a python script.
Has /usr/lib/python2.7/site-packages/PyQt4/uic/pyuic.py
somehow been over-written with the bash script?
Try opening that file, and also /usr/bin/pyuic4
, in an editor to see what they contain.