Install PyQt4.11.2 on Scientific Linux 6.5

I know that this is probably something trivial, but I can not find the answer. I just completed a new installation of Scientific Linux 6.5 - which comes with Python 2.6 and Qt 4.6.2. I want to use the python2.7.8 Python interpreter, so I downloaded and installed. I use QtDesigner for convenience when creating guis, so PyQt needs to be bound for this. So I downloaded SIP-4.16.3 configured with

python2.7./configure (in the sip download directory)

to create bindings for a newer version of python. So far, everything is working fine. Then I try to install PyQt4.11.2 in the same way:

python2.7./configure --qmake = / usr / lib / qt4 / bin / qmake -g (to get the qt4 version of qmake with static qt libraries)

The script configuration completes fine, but during make you get the following error:

error: 'PrintCurrentPage is not a member' QAbstractPrintDialog .... / Downloads / PyQt -x11-gpl-4.11.2 / QtGui / sipQtGuiQAbstractPrintDialog.cpp: 1787: error: too many initializers for 'sipEnumMemberDef make [1]: * [sipqtgial .o] Error 1 make [1]: Exiting the directory `.... / Downloads / PyQt-x11-gpl-4.11.2 / QtGui 'make: * [all] Error 2

At this moment I got a little lost and stumbled a little on my head, it should be something simple that I missed, any help would be great.

Thanks in advance

+5
source share
2 answers
  • Look for the string 'PrintCurrentPage' in the files of your PyQt package. You will find it in 4 files.
  • Delete the corresponding lines with the line 'PrintCurrentPage'
+2
source

I know this thread is old, but I encountered a similar error when installing PyQt4.11.4 from a source on a Red Hat Enterprise Linux 5 computer.

In the end, I added the members 'PrintShowPageSize = 0x0008' and 'PrintCurrentPage = 0x0040' to the QAbstractPrintDialog class definition. This C ++ class definition is in the qabstractprintdialog.h header file. In my distribution, it was located in /usr/lib64/qt4/include/QtGui/ .

After adding these missing elements, I ran make again without compilation errors.

The only reason I came across this solution is to look here qtabstractprintdialog.h here . I noticed that in my version of the header file those members of the QAbstractPrintDialog class were missing.

I have not yet installed a new installation of PyQt4, so I cannot guarantee the functionality now. But he compiled / installed!

+1
source

Source: https://habr.com/ru/post/1204428/


All Articles