I am fairly new to python, and am having issues using PyQt5. Basically, i am trying to run the code i got from following this website (QtDesigner and PyQt5 basic tutorial), but am having issues:
https://nikolak.com/pyqt-qt-designer-getting-started/
I am using Python 3.6.1 on Windows with PyQt5. I am aware that the above tutorial uses Python 2 and PyQt4. I don't think that is part of the issue, but I could be wrong.
I try to run the main.py script from the above tutorial, and i get this error:
AttributeError: module 'PyQt5.QtGui' has no attribute 'QMainWindow'
because of line 6 in main.py. I assume that this is because PyQt5 is not properly installed, so I use pip:
pip install pyqt5
but get the following error:
Could not find a version that satisfies the requiremenet pyqt5 (from versions: )
No matching distribution found for pyqt5
I realize that some of the above main.py code will only work for pyqt4, I am just trying to get past the issue of not being able to correctly import PyQt5. Another program, that is made for PyQt5 and python 3.6, is having similar issues. When I try:
from PyQt5.QtWidgets import QMainWindow
I get this error back:
ImportError: cannot import name 'QMainWindow'
I have been trying to fix this issue for a while now, and have not found anything that has helped my situation thus far. Any help would be greatly appreciated, so that I can finally get this thing to work.