semofa
Posts: 21
Joined: Mon Jun 01, 2015 8:18 pm

Syntax error: word unexpected (expecting ")") ERROR

Fri Jul 31, 2015 5:11 pm

Hi,
I followed this link https://github.com/pyqt/python-qt5/wiki ... untu-12.04 to install pyqt5 on raspbian.
when I want configure (python configure.py)PyQt, I faced the following error:

Code: Select all

Querying qmake about your Qt installation...
/usr/local/qt5pi/bin/qmake: 1: /usr/local/qt5pi/bin/qmake: ELF: not found
/usr/local/qt5pi/bin/qmake: 2: /usr/local/qt5pi/bin/qmake: Syntax error: word unexpected (expecting ")")
Error: PyQt5 requires Qt v5.0 or later. You seem to be using v3. Use the
--qmake flag to specify the correct version of qmake.

Heater
Posts: 13868
Joined: Tue Jul 17, 2012 3:02 pm

Re: Syntax error: word unexpected (expecting ")") ERROR

Fri Jul 31, 2015 5:23 pm

There is no Qt5 in the Raspian system. So installing PyQt5 is going to be a bit of strife.

First install Qt5 from the repository at twolife https://twolife.be/raspbian/

When you have that done try to install PyQt5 again. Report pack here when that fails.

Or...why not just use PyQt for Qt 4 ?
Memory in C++ is a leaky abstraction .

semofa
Posts: 21
Joined: Mon Jun 01, 2015 8:18 pm

Re: Syntax error: word unexpected (expecting ")") ERROR

Fri Jul 31, 2015 5:31 pm

I installed Qt5 using this http://wiki.qt.io/RaspberryPi_Beginners_Guide .
but when I run

Code: Select all

python configure.py --qmake ~/Qt5.3.1/5.3/gcc_64/bin/qmake --sip-incdir ../sip-4.16.5/siplib
I faced the error

Heater
Posts: 13868
Joined: Tue Jul 17, 2012 3:02 pm

Re: Syntax error: word unexpected (expecting ")") ERROR

Fri Jul 31, 2015 6:23 pm

There is the problem. Those instructions at http://wiki.qt.io/RaspberryPi_Beginners_Guide are for compiling Qt apps on a PC with a cross-compiler. As far as I know that does not build a Raspi version of qmake that you can use on the Pi.

I have managed to compile Qt5 on the Pi itself, including creating a qmake on the Pi. I have documented what I did here: http://the.linuxd.org/qt-5-2-for-raspberry-pi/. Others have had success with that. That process is pretty complex and takes many hours so I provide the finished binaries as a package. See the link.

I suspect though, that it's better to install Qt5 from twolife as I said above. They will be more up to date.

In general the whole Qt5 thing is a minefield and will be until we get a Jessie version of Raspian with Qt5 packages.
Memory in C++ is a leaky abstraction .

Return to “General discussion”