Install PyQt in a virtualenv with Pip

Noticed that pip install pyqt isn't working? At least at the time of writing this blog it isn't..

This is the error that I got:
IOError: [Errno 2] No such file or directory: setup.py

It seems they didn't package it well and it's using configure.py to install. So here is the solution to install it by using pip to download the files and configure and install manually.

Solution copied from: http://stackoverflow.com/a/13967084/376445

workon myProject  
pip install --no-install SIP  
pip install --no-install PyQt  
cd ~/.virtualenvs/myProject/build/SIP  
python configure.py  
make  
make install  
cd ~/.virtualenvs/myProject/build/PyQt  
python configure.py  
make  
make install  
cd && rm -rf ~/.virtualenvs/myProject/build # Optional.

Issues I encountered:

Soltution: Install the development headers (Ubuntu 12.04)

sudo apt-get install libqt4-dev