[英]Installing Qt5 and PyQt5 for Python 2.7
I am new to Stack Overflow and Python. 我是Stack Overflow和Python的新手。
I am developing for Visual Effects, which means that I am (and will continue) using Python 2.7. 我正在为Visual Effects开发,这意味着我(并将继续)使用Python 2.7。 I'm a bit lost and looking for clear instructions on how to install pyqt5
. 我有点迷茫,正在寻找有关如何安装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
? 有很多关于此主题的信息,例如,您需要QT5
还是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: 例如:
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. 它用于在Python 3上安装PyQt5,但我认为与Python 2相同。
Update: Since you didn't say any specific OS, I will assume you're using Windows. 更新:由于您没有说任何特定的操作系统,因此我假设您使用的是Windows。 For Windows, there is already Python distribution which is ready to use such as WinPython . 对于Windows,已经有可以使用的Python发行版,例如WinPython 。 This is what I've done on my machine: 这是我在计算机上完成的操作:
You can start designing your GUI with double-clicking Qt Designer.exe . 您可以双击Qt Designer.exe开始设计GUI。 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. 设计完GUI后,可以使用pyuic5 -x yourgui.ui -o yourgui.py
命令将GUI文件(扩展名为*.ui
)转换为*.py
。
python
and pyuic5
command on your command prompt can only be executed in your WinPython installation folder. 命令提示符上的python
和pyuic5
命令只能在WinPython安装文件夹中执行。 inside your WinPython installation folder. 在您的WinPython安装文件夹中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.