Switch to the Python version you want to use:
pyenv shell 2.7.9
Create the virtualenv
:
pyenv virtualenv <name-of-virtualenv>
Activate the virtualenv
:
pyenv activate <name-of-virtualenv>
Find out what the path to the virtualenv
is:
ls ~/.pyenv/versions
It will most likely look something like: ~/.pyenv/versions/<name-of-virtualenv>
Otherwise, the environmental variable can be read:
echo $VIRTUAL_ENV
Change to the directory where the SIP
source was extracted:
cd /path/to/src/SIP
Configure, and make sure to include python2.7
for the virtualenv:
python configure.py --incdir=$VIRTUAL_ENV/include/python2.7
Then compile and install:
make
make install
cd /path/to/src/PyQt4
python configure.py
make
make install
Ubuntu: libqt4-dev
could be required
sudo apt-get install libqt4-dev