如何在 Python 3 (Ubuntu 14.04) 中安装 PyQt5 [英] How to install PyQt5 in Python 3 (Ubuntu 14.04)

查看:49
本文介绍了如何在 Python 3 (Ubuntu 14.04) 中安装 PyQt5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要将一些 Python2+PyQt4 的代码移植到 Python3+PyQt5.

I need to port some code that's Python2+PyQt4 to Python3+PyQt5.

我开始安装 pip3

sudo apt-get install python3-pip

效果很好.试过

sudo pip3 install PyQt5
Downloading/unpacking PyQt5
  Could not find any downloads that satisfy the requirement PyQt5
Cleaning up...
No distributions at all found for PyQt5

网上我找到以下步骤:

http://pyqt.sourceforge.net/Docs/PyQt5/installation.html

但是他们太多了.在 Ubuntu 14.04 中安装 PyQt5 和 Python3 的最简单方法是什么?

But they are too many. What's the easiest way to Install PyQt5 along with Python3 in Ubuntu 14.04 ?

推荐答案

为什么不直接通过 apt-get 安装?

Why not simply install it via apt-get?

sudo apt-get install python3-pyqt5

否则您必须手动编译 PyQt(可能还有 Qt),这很麻烦.

Otherwise you'd have to compile PyQt (and potentially Qt) by hand, which is cumbersome.

这篇关于如何在 Python 3 (Ubuntu 14.04) 中安装 PyQt5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆