[PyQt] [Eric] Recipe for parallel installation of PyQt5 and PyQt4 on Windows

Detlev Offenbach detlev at die-offenbachs.de
Sat Jan 18 17:01:18 GMT 2014



On Saturday 18 January 2014, 16:47:16 Phil Thompson wrote:
> On 18-01-2014 2:54 pm, Detlev Offenbach wrote:
> > Hello,
> > 
> > here is a short info about how I got a parallel installation of
> > PyQt4/Qt4 and PyQt5/Qt5 for Python3 on Windows using the installers
> > provided via the PyQt site.
> > 
> > 1) Download both installers.
> > 
> > 2) Install PyQt4
> > 
> > 3) recommended: Install eric5 and verify, that eric5/PyQt4/Qt4 work
> > ok.
> > 
> > 4) Open an explorer window, move to the site-packages directory (e.g.
> > C:Python33Libsite-packages)
> > 
> > 5) Make a copy of the PyQt4 directory
> > 
> > 6) Uninstall PyQt4 so the PyQt5 installer doesn't complain later on.
> > 
> > 7) Install PyQt5
> > 
> > 8) Rename the copy of the PyQt4 directory to 'PyQt4'
> > 
> > 9) Voila.
> > 
> > My preliminary tests using the eric5 QRegularExpression wizard, which
> > invokes a background process using PyQt5, worked fine.
> > 
> > If further tests of the community don't show severe issues, I would
> > like to ask Phil to generate an installer including both PyQt4/Qt4
> > and
> > PyQt5/Qt5 to make it easier for the community. It seems that most
> > people on Windows don't like to compile something.
> 
> I don't see how that can work. There can only be one qt.conf file and
> it can refer to either the Qt4 libs or the Qt5 libs, but not both.

That is right. However, the qt.conf file is in PyQt4 and PyQt5 directory and each contains the 
paths to the Qt librarys (that is one contains PyQt4, the other PyQt5). Works fine on my 
maschine.

Phil, please just try it. If you find issues that crash one or the other installation, I will shut up and 
never mention this again. However, at the moment I am not convinced that there is a show 
stopper.

This is the contents of my qt.conf of PyQt4:
[Paths]
Prefix = C:/Python33/Lib/site-packages/PyQt4
Binaries = C:/Python33/Lib/site-packages/PyQt4

That is the on of the PyQt5 qt.conf:
[Paths]
Prefix = C:/Python33/Lib/site-packages/PyQt5
Binaries = C:/Python33/Lib/site-packages/PyQt5

And there is a third qt.conf file in the Python directory with the contents of the last install (i.e. 
PyQt5). I got the impression, that the one in the PyQt[45] directories have precedence over the 
global one.


Detlev-- 
*Detlev Offenbach*
detlev at die-offenbachs.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20140118/b0b7700a/attachment.html>


More information about the PyQt mailing list