PyQt5: How to install/run Qt Designer

130,352

Solution 1

The latest PyQt5 wheels (which can be installed via pip) only contain what's necessary for running applications, and don't include the dev tools. This applies to PyQt versions 5.7 and later. For PyQt versions 5.6 and earlier, there are binary packages for Windows that also include the dev tools, and these are still available at sourceforge. The maintainer of PyQt does not plan on making any further releases of such binary packages, though - only the runtime wheels will now be made available, and there will be no official wheels for the dev tools.

In light of this, someone has created an unofficial pyqt5-tools wheel (for Windows only). This appears to be in it's early stages, though, and so may not keep up with recent PyQt5 releases. This means that it may not always be possible to install it via pip. If that is the case, as a work-around, the wheel files can be treated as zip files and the contents extracted to a suitable location. This should then allow you to run the designer.exe file that is in the pyqt5-tools/designer folder.

Finally, note that you will also see some zip and tar.gz files at sourceforge for PyQt5. These only contain the source code, though, so will be no use to you unless you intend to compile PyQt5 yourself. And just to be clear: compiling from source still would not give you all the Qt dev tools. If you go down that route, you would need to install the whole Qt development kit separately as well (which would then get you the dev tools).

Solution 2

I struggled with this as well. The pyqt5-tools approach is cumbersome so I created a standalone installer for Qt Designer. It's only 40 MB. Maybe you will find it useful!

Solution 3

If you are working in python virtual environment, in the command window

>>qt5-tools designer

can open designer window.

Solution 4

The Qt designer is not installed with the pip installation.

You can either download the full download from sourceforge (probably won't be the last pyqt release, and might be buggy on presence of another installation, like yours) or install it with another (unofficial) pypi package - pyqt5-tools (pip install pyqt5-tools), then run the designer from the following subpath of your python directory -

...\Python36\Lib\site-packages\pyqt5-tools\designer\designer.exe

Solution 5

pip install pyqt5-tools

Then restart the cmd, just type "designer" and press enter.

Share:
130,352

Related videos on Youtube

User1291
Author by

User1291

Updated on January 21, 2022

Comments

  • User1291
    User1291 over 2 years

    Feeling really stupid, right now, but the title says it all:

    How do you start the QtDesigner?

    I've installed PyQt5 via pip and I believe to have identified the directory it's been installed in as

    C:\Users\%username%\AppData\Local\Programs\Python\Python36\Lib\site-packages\PyQt5
    

    Now what? There are a lot of .pyd files, some .dll's, too, but nothing executable (well, except a QtWebEngineProcess.exe in ...\site-packages\PyQt5\Qt\bin, but that doesn't sound like what I'm looking for.

    • Michael Herrmann
      Michael Herrmann over 5 years
      If you're still struggling, you may also try my standalone installer for Qt Designer. It's only 40 MB and creates a simple "Qt Designer" entry in the Start menu.
    • mins
      mins over 5 years
      As of December 2018, with Python 3.6 and PyQt5 under Windows 7, QT designer car be installed simply with pip install pyqt5-tools. An executable is then available in C:\Program Files\Python36\Lib\site-packages\pyqt5_tools
  • User1291
    User1291 over 7 years
    Thank you! pip install pyqt5-tools gave me a No matching distribution found, though, so I'll try sourceforge (kind of defeats the purpose of having pip, but ...).
  • Uriel
    Uriel over 7 years
    Just tried again to install pyqt5-tools with pip, and all worked fine.
  • User1291
    User1291 over 7 years
    Any ideas what could be causing the "no matching distribution"? pip install pyqt5 gives me requirement already satisfied for both, pyqt5 and sip (and it should, given that's how I installed pyqt5 in the first place). Doesn't stop pyqt5-tools from failing.
  • User1291
    User1291 over 7 years
    On this machine? Win7, still.
  • User1291
    User1291 over 7 years
    Btw, that sourceforge link is for x86. Any x64 directories?
  • Uriel
    Uriel over 7 years
    Yeah, browse the installations manually under the "files" tab (near "summary", under the title with the logo), then navigate to "PyQt5".
  • ekhumoro
    ekhumoro over 7 years
    @User1291. The current pyqt5-tools is for PyQt-5.7 not PyQt-5.7.1, so it's not compatible. However, you should be able to open the pyqt5-tools wheel like a zip file and extract the contents to a suitable location. You can then try running the designer.exe file in the pyqt5-tools/designer folder.
  • User1291
    User1291 over 7 years
    @ekhumoro Indeed, thank you. Works and doesn't risk interfering with the installed pyqt5. Want to make an answer out of it?
  • User1291
    User1291 over 7 years
    @UrielEli Either I'm missing something or these archives don't contain the designer either.
  • altendky
    altendky over 6 years
    @User1291 i've added support for several more versions and am working on linux wheels now. sorry there isn't a better list of versions but you can check ci.appveyor.com/project/KyleAltendorf/pyqt5-tools/build/268 for a list of the versions that 1.2 was released for. with this versioning it's a bit weird but i'm thinking specifying something like pyqt5-tools~=5.7.1.0 is where you end up (python.org/dev/peps/pep-0440/#compatible-release). Raise an issue at github.com/altendky/pyqt5-tools if something isn't working for you.
  • Hrvoje T
    Hrvoje T over 5 years
    pyqt5-tools-wheel works from pip. After that, just start designer.exe from Python\Scripts folder. Thanks!
  • Daniel Farrell
    Daniel Farrell about 5 years
    This should be the top answer in my opinion.
  • Pedro Serpa
    Pedro Serpa almost 5 years
    Thank you a thousand times!
  • BarryM
    BarryM over 3 years
    This helped with Python 3.9 under Windows. Thanks. That got me QtDesigner. ... To get pyuic5 also going (to generate Python output) I had to also install pyuic5-tool with pip.
  • Captain Fantastic
    Captain Fantastic about 3 years
    I found it here: C:\Python37-32\Lib\site-packages\qt5_applications\Qt\bin
  • emcek
    emcek about 3 years
    Can you update you installer is pretty old 5.11 :/
  • Edward Zhang
    Edward Zhang about 3 years
    This answer is a correct answer and deserves an up.
  • Omkar76
    Omkar76 about 3 years
    I'm not using venv, installed pyqt5-tools globally. This works. Thanks!
  • Muneeb Ahmad Khurram
    Muneeb Ahmad Khurram about 3 years
    this works both in venv and in global enviorments.
  • Mostafa Abdulrazic
    Mostafa Abdulrazic almost 3 years
    @CaptainFantastic Thank you! It was driving me crazy.
  • Ibrahim Ahmed
    Ibrahim Ahmed almost 3 years
    C:\Users\"UserName"\AppData\Local\Programs\Python\Python39\L‌​ib\site-packages\qt5‌​_applications\Qt\bin then will find -> designer.exe
  • Abinash Tripathy
    Abinash Tripathy almost 3 years
    Thank you very much, I recently installed pyqt6-tools and was confused about this. This answer is perfect for me. IF you have already installed the tools and are unable to locate the designer then try this step. for QT6 look for Python39\Lib\site-packages\qt6_applications\Qt\bin and you will find the designer.exe
  • darthn
    darthn over 2 years
    This tool is seemingly for windows and mac only - do you have a solution for linux?
  • Neil T.
    Neil T. over 2 years
    It works. Upvoted.
  • Andy Brown
    Andy Brown almost 2 years
    I wish there was a way to move posts to the top when the old ones are out of date. May 2022, Visual Studio Code - this is exactly where designer.exe now sits.