简体   繁体   中英

Cannot install PyQt5 on PyCharm

I get this error each time I try to install PyQt5 on PyCharm

错误

So I try running the executed command from the system terminal as suggested in the screenshot and get this.

zsh: command not found: pip

I use this this command instead

python3 -m pip install PyQt5

and it shows as already installed

However, in PyCharm, PyQt5 is still undetected.

enter the following code in your terminal

"pip install pyqt5 pyqt5-tools"

Test if pqyt5 is actually installed Create a new file, example.py, and enter the following code.

import sys    
from PyQt5 import QtWidgets, QtCore  

app = QtWidgets.QApplication(sys.argv)  
widget = QtWidgets.QWidget()  
widget.resize(400, 200)  
widget.setWindowTitle("This is PyQt Widget example")  
widget.show()        
exit(app.exec_()) 

Read this Article below I think it's very helpful that's is where i got my knowledge https://pythonpyqt.com/how-to-install-pyqt5-in-pycharm/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM