Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing Pyqt4 with brew

Im working with brew to install PyQt on python3 but I cant seem to get it to work

I ran brew install pyqt and brew doctor to fix all possible errors but still when running my code I keep getting

ImportError: No module named 'PyQt4'

If I run echo $PATH im getting /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin

Can someone please guide me on fixing this problem? I am also using PyCharm but I still get the same error if I run in terminal python3 then import pyqt

please help me :( im really new in this but I tried everything that I could find in google

thanks!

PD: Running brew test pyqt does not bring an error but it does not open. Also I installed python3 with brew and im currently running it from /usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/bin/python3.4

like image 753
Jose Maria de la Torre Avatar asked Apr 04 '15 18:04

Jose Maria de la Torre


People also ask

Is PyQt4 compatible with Python 3?

PyQt4 is a comprehensive set of Python bindings for Digia's Qt cross platform GUI toolkit. PyQt4 supports Python v2 and v3.

How do I download PyQt4?

Downloading PyQt4 You can get the latest release of the GPL version of the PyQt4 source code from http://www.riverbankcomputing.com/software/pyqt/download. If you are using the commercial version of PyQt4 then you should use the download instructions which were sent to you when you made your purchase.


1 Answers

If you want to use PyQt4 with Python 3, you should use this command to tell homebrew:

brew install PyQt --with-python3

like image 183
Andreas Schulz Avatar answered Sep 27 '22 17:09

Andreas Schulz