How to install PyQt5 on a new virtualenv and work on an IDLE

Gouz picture Gouz · Aug 4, 2013 · Viewed 21.8k times · Source

I installed PyQt5 globally on my win7 system (python 3.3), using the installer provided from the official riverbank website.

Then i created a new –no-site-packages virtualenv, where the only things i see listed after typing pip list, are pip (1.4) and setuptools (0.9.7).

The problem now however, is that i need to install there the complete PyQt5 too and this seems impossible using the pip tool.

Both pip install sip and pip install PyQt5 inside the virtual enviroment are returning errors.

Can someone provide a "how to" guide of what exactly should i do?

I also want to be able to work with that PyQt5 (of the new virtualenv) from inside an IDLE, so I copied the tcl folder from the global installation of my Python to the location of my virtual environment and also created a shortcut targeting: {location of my virtual enviroment}\Scripts\pythonw.exe C:\Python33\Lib\idlelib\idle.pyw so i could open the virtualenv IDLE and not the global one. (Hope I did not do anything wrong there... correction maybe please.)

Answer

boweeb picture boweeb · Aug 26, 2013

Both "pip install sip" and "pip install PyQt5" inside the virtual enviroment are returning errors.

If the errors you're referring to are:

Could not find any downloads that satisfy the requirement [pyqt5|sip]

and

No distributions at all found for [pyqt5|sip]

Then this answer should shed light on this. Basically, PyPI is only providing a link to the homepage and/or source -- not a downloadable package or egg. Here are the links to PyQt5 and SIP PyPI pages. I know it seems strange that a package manager wouldn't provide packages, but that's the way it is.

You'll have to download, compile, and install sip and pyqt5 from source, inside your virtualenv. I wish I could provide details but I'm currently working through this myself.