简体   繁体   中英

Installing Qt5 and PyQt5 for Python 2.7

I am new to Stack Overflow and Python.

I am developing for Visual Effects, which means that I am (and will continue) using Python 2.7. I'm a bit lost and looking for clear instructions on how to install pyqt5 . I know this seems pretty elementary, so I appreciate everyone's patience.

There is a lot of information on this subject like, you need QT5 or Scintilla ? A lot of the instructions are fragmented and don't have all of the information. I was wondering if someone could point me in the right direction with clear and concise instructions.

For example:

  1. Install Python 2.7
  2. Install x
  3. ...
  4. ...
  5. ...

I'm willing to figure it out myself, but I feel the information I have has a lot of holes and could use some help/direction.

Thanks in advance.

Maybe this link can help. It is for installing PyQt5 on Python 3, but I think it will be the same process for Python 2.

Update: Since you didn't say any specific OS, I will assume you're using Windows. For Windows, there is already Python distribution which is ready to use such as WinPython . This is what I've done on my machine:

  1. Download appropriate WinPython version for your machine,
  2. Download appropriate PyQt5 wheels version for your machine,
  3. Install WinPython,
  4. Extract the downloaded PyQt5 wheels,
  5. Copy pyqt5-tools folder found inside where you extracted PyQt5 wheels
  6. Paste it to Where_You_Installed_WinPython\\Lib\\site-packages.

You can start designing your GUI with double-clicking Qt Designer.exe . After you finished designing your GUI, you can convert the GUI file (with *.ui extension) to *.py with pyuic5 -x yourgui.ui -o yourgui.py command.

python and pyuic5 command on your command prompt can only be executed in your WinPython installation folder. inside your WinPython installation folder.

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