Skip to content

Instantly share code, notes, and snippets.

@davidbalbert
Last active June 22, 2019 19:59
Show Gist options
  • Save davidbalbert/5768767 to your computer and use it in GitHub Desktop.
Save davidbalbert/5768767 to your computer and use it in GitHub Desktop.
PyQwt in a virtualenv
brew install qt # should already be done
brew install qwt # should already be done
brew install portaudio # should already be done
brew install wget # makes some downloading easier
# set up your virtualenv (`workon friture` if you've already created it)
mkvirtualenv friture
cd /tmp
# install numpy
pip install numpy
# install sip (pyqt dependency)
wget http://sourceforge.net/projects/pyqt/files/sip/sip-4.14.6/sip-4.14.6.tar.gz
tar xvzf sip-4.14.6.tar.gz
cd sip-4.14.6
python configure.py --incdir=$HOME/.virtualenvs/friture/include
make
make install
cd ..
# install pyqt
wget http://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-4.10.1/PyQt-mac-gpl-4.10.1.tar.gz
tar xvzf PyQt-mac-gpl-4.10.1.tar.gz
cd PyQt-mac-gpl-4.10.1
python configure.py
make -j4 # takes quite some time. The -j4 tells Make to build 4 tasks at once. One for each core of your computer.
make install
cd ..
# install pyqwt
wget "http://downloads.sourceforge.net/project/pyqwt/pyqwt5/PyQwt-5.2.0/PyQwt-5.2.0.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fpyqwt%2F%3Fsource%3Ddlp&ts=1371067906&use_mirror=iweb"
mv "PyQwt-5.2.0.tar.gz?r=http:%2F%2Fsourceforge.net%2Fprojects%2Fpyqwt%2F?source=dlp&ts=1371067906&use_mirror=iweb" PyQwt-5.2.0.tar.gz
tar xvzf PyQwt-5.2.0.tar.gz
cd PyQwt-5.2.0/configure
python configure.py -Q ../qwt-5.2
make -j4
make install
cd ../../
python -c 'from PyQt4 import Qwt5' # no errors? woohoo, it works!
# extra credit: install friture and make sure it works too:
pip install distribute
pip install pyaudio
pip install PyOpenGL
pip install psutil
pip install cython
pip install friture
python -c 'import friture'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment