lemonader lemonader - 24 days ago 20
Python Question

No module named PyQt4 according to it is installed

I want to run FlatCAM on MAC OS X El Capitan and it needs PyQt package. I installed PyQt4 using homebrew.

$ brew install qt

Warning: qt-4.8.7_2 already installed

$ brew install pyqt

Warning: pyqt-4.11.4 already installed

$ brew install sip

Warning: sip-4.18.1 already installed

$ brew install PyQt --with-python

Warning: pyqt-4.11.4 already installed

Although these warnings, when I run FlatCAM, I take this error:

Traceback (most recent call last):
File "FlatCAM.py", line 2, in
from PyQt4 import QtGui
ImportError: No module named PyQt4


Why it doesn't see PyQt4?

Answer

FlatCAM uses python 2.7 but default homebrew installation seems like using python3.

Solution here: How can i install PyQT4 for Python 2.7?

Comments