I am trying to install PyQT4 on Python 2.7.9, I am on Mac OS X, so i tried installing it via Homebrew and Macports, unfortunately non of them seemed to work.
This is what I tried:
brew install python qt pyqt pyside pyside-tools
also tried:
brew install PyQT4
On Macports:
sudo port install py27-pyqt4
No matter what I did, I was getting this error:
>>>> import PyQT4
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named PyQT4
What can be the problem? Do I need to set env path for PyQT?
I installed PyQtX package, (PyQt binary for Mac OS X) from here.
and then specified PYTHONPATH
with this:
export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH
After typing in import PyQt4
it worked without any problems. (Case Sensitive)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With