[PyQt] Recreating virtualenvs with PyQt

Florian Bruhin me at the-compiler.org
Mon Mar 13 08:12:53 GMT 2017


* Phil Thompson <phil at riverbankcomputing.com> [2017-03-13 08:04:53 +0000]:
> On 13 Mar 2017, at 6:39 am, Florian Bruhin <me at the-compiler.org> wrote:
> > 
> > Hi,
> > 
> > The usual way to recreate a virtualenv is to freeze its dependencies
> > and install them in a new env:
> > 
> >    venv1/bin/pip freeze > requirements.txt
> >    venv2/bin/pip install -r requirements.txt
> > 
> > However, this doesn't seem to work with PyQt5 since the fixed up 5.7.1
> > packages. "pip freeze" still shows 5.7.1, but that's not installable:
> 
> You mean the fixed up 5.8.1 packages?

Err, right.

> > 	$ venv1/bin/pip install PyQt5
> > 	Collecting PyQt5
> > 	  Using cached PyQt5-5.8.1.1-5.8.0-cp35.cp36.cp37-abi3-manylinux1_x86_64.whl
> > 	Collecting sip<4.20,>=4.19 (from PyQt5)
> > 	  Using cached sip-4.19.1-cp36-cp36m-manylinux1_x86_64.whl
> > 	Installing collected packages: sip, PyQt5
> > 	Successfully installed PyQt5-5.8.1 sip-4.19.1
> > 
> > 	$ venv1/bin/pip freeze
> > 	appdirs==1.4.3
> > 	packaging==16.8
> > 	pyparsing==2.2.0
> > 	PyQt5==5.8.1
> > 	sip==4.19.1
> > 	six==1.10.0
> > 
> > 	$ venv1/bin/pip freeze > requirements.txt
> > 	$ venv2/bin/pip install -r requirements.txt
> > 	Requirement already satisfied: appdirs==1.4.3 in ./venv2/lib/python3.6/site-packages (from -r requirements.txt (line 1))
> > 	Requirement already satisfied: packaging==16.8 in ./venv2/lib/python3.6/site-packages (from -r requirements.txt (line 2))
> > 	Requirement already satisfied: pyparsing==2.2.0 in ./venv2/lib/python3.6/site-packages (from -r requirements.txt (line 3))
> > 	Collecting PyQt5==5.8.1 (from -r requirements.txt (line 4))
> > 	  Could not find a version that satisfies the requirement PyQt5==5.8.1 (from -r requirements.txt (line 4)) (from versions: 5.7.1, 5.8, 5.8.1.1)
> > 	No matching distribution found for PyQt5==5.8.1 (from -r requirements.txt (line 4))
> 
> It's probably because I cheated because I simply renamed the wheel file and didn't change the internal meta-data to quickly work around a problem with PyPI.
> 
> If you edit requirements.txt to say PyQt5==5.8.1.1 it will probably work.

It does - I wonder if this will break other stuff (requirement update
services, tooling around pip) though.

Florian

-- 
http://www.the-compiler.org | me at the-compiler.org (Mail/XMPP)
   GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc
         I love long mails! | http://email.is-not-s.ms/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20170313/a99ac103/attachment.sig>


More information about the PyQt mailing list