1
votes

I am trying to install PyQt5 on my windows. My python is 3.16. pip install PyQt5 gives not error and it seems PyQt5 is installed. Future "pip install PyQt5" gives the message "Requirement already satisfied"

enter image description here

Then in same terminal I run "python test.py" and test.py contains single line "from PyQt5.QtWidgets import QMainWindow". this gives me error "No module named PyQt5.QtWidgets". "where pip" and "where python" are pointing to same python distribution. PyQt5 is in site-packages.

Can anybody say what is going on?

This is the same issue I have asked a few days before but in that time I got same error when installing with wheels. Now I kind a localized the issue.

2
it again my question. I am working on this last few days. This one is more simplified question since doesn't deal with wheels. - ArmanHunanyan
Why not edit or remove your previous question? - phd
Already deleted. - ArmanHunanyan

2 Answers

0
votes

I tried to solve this 2 days then I give up and reinstalled python. This solves the problem. Still don't understand the cause of issue.

0
votes

Did you include the path of PyQt5 in the environment variables[path] add C:\Python34\Scripts,C:\Python34\Lib\site-packages\, C:\Python34\Lib\site-packages\PyQt5\, that is mine yours maybe different, i solved it that way.