I'm writing this up as an answer because comments are not a good place for multiline code block. Not guaranteed to work, because OP seems rather confused about his/her environment. (Personally I don't have a clean environment to play with — my brew and python environments are already full of stuff. But I definitely got pyqt
working, which I never installed before.)
Assuming your brew installation is in /usr/local
, and your shell is bash or zsh, do the following step by step (strip the comments if you haven't turned on interactive comments):
> # edit your .bashrc/.zshenv/.zshrc and get rid of your custom PYTHONPATH; > # brew will take care of that for you > export PATH=/usr/local/bin:$PATH > brew install python pyqt > exec $SHELL -l # shouldn't need this, but why not?
Now run /usr/local/bin/python
and try to from PyQt4.QtGui import *
again.