I'm trying to install PyQt on my mac so that I can install python ghost. I've already installed Qt, and SIP. I've downloaded PyQt, but when I run
python configure-ng.py
I get the following error:
Error: Use the --qmake argument to explicitly specify a working Qt qmake.
Any ideas on what I should do?
Since you are on a Mac, I would use Homebrew. This worked for me the other day, but took a long time to finish:
brew install pyqt
Without command line using PyCharm IDE. Also I didn't need to install Qt.:
Automatically it is going to install PyQt 5.8.2 and SIP. After installed just, come back to Project Interpreter and make sure that SIP was installed too. If it is not installed: '+' button and install sip.
Try this code to see if it works for you too. :)
#!/usr/bin/env python3
from PyQt5.QtWidgets import QLabel, QVBoxLayout, QWidget
from PyQt5.QtCore import Qt
class Example(QWidget):
def __init__(self):
super().__init__()
self.initUI()
def initUI(self):
self.setFixedSize(200, 100)
self.setWindowTitle('Example')
label = QLabel('Hello')
layout = QVBoxLayout()
layout.addWidget(label)
layout.setAlignment(Qt.AlignCenter)
self.setLayout(layout)
if __name__ == '__main__':
import sys
from PyQt5.QtWidgets import QApplication
app = QApplication(sys.argv)
ex = Example()
ex.show()
sys.exit(app.exec_())
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