Python Forum
[PyQt] Trouble getting pyuic5 to work
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyQt] Trouble getting pyuic5 to work
#1
Hi there. I just joined. I’m teaching myself some Python. My coding skills are OK, but my understanding of the inside of the OS etc is not (and I’m too old to learn that too). I have Designer installed and I am trying to convert a .ui file into a .py file using pyuic5, but cannot get it to work. I keep getting the error in the terminal ModuleNotFoundError: No module named 'PyQt5'. I have PyQT5 installed, because I’ve been using it - I’ve made some GUIs with it just by coding them, without using Designer. I also have imported/installed pyuic5 - I did this through PyCharm’s UI, rather than manually via the terminal (because that wouldn’t work - maybe for the same reason). I have Python3.8 installed and am using PyCharm. I have set up virtual environments for each project and so far have PyQt5 installed into only one project/venv. I am on a Mac so it also have Python2.7 sitting on it, and I do have Python3.7 there too - don’t know where that came from. I have tried many different paths to run the conversion commands in terminal but they always come back with the same error. I can double click on the pyuic5 file in Finder and it opens terminal and doesn’t give that error - it appears to be OK because it says something like, ‘you have to specify a file etc’. I have looked on the net a lot and all the answers fall into two categories, being 1) don’t work, or 2) I don’t understand. I am hoping someone has a dumbed-down way to explain to me what the problem is and how to fix it. Cheers, RH
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020