码迷,mamicode.com
首页 > 系统相关 > 详细

ubuntu 15.10下安装PyQt5

时间:2015-11-10 01:57:26      阅读:510      评论:0      收藏:0      [点我收藏+]

标签:

目标是  http://www.oschina.net/p/pyqt 开源中国 客户端

1 http://pyqt.sourceforge.net/Docs/PyQt5/installation.html#configuring-pyqt5

下载安装  http://www.riverbankcomputing.com/software/pyqt/download5 



Error: PyQt5 requires Qt v5.0 or later

           


   I want to install PyQt5 on Ubuntu 14.04.2. Once downloaded and uncompressed, I run python configure.py as it is mentioned on the previous link. However, it asks me to install QT 5 or later. Which thing I did.

When I come back to run the command above, I get the same error:

begueradj@begueradj-hacker:~/Bureau/PyQt-gpl-5.4.1# python configure.py 
Querying qmake about your Qt installation...
Error: PyQt5 requires Qt v5.0 or later. You seem to be using v4.8.6. Use the
--qmake flag to specify the correct version of qmake.
               


However, after Qt5 installation, when I run this: qmake --version                


I get this:  


QMake version 2.01a Using Qt version 4.8.6 in /usr/lib/x86_64-linux-gnu                

sudo apt-get install qt5-default,
               


Error: Make sure you have a working sip on your PATH or use the --sip argument to explicitly specify a working sip

begueradj@begueradj-hacker:~/Bureau/PyQt-gpl-5.4.1# python configure.py 
Querying qmake about your Qt installation...
Determining the details of your Qt installation...
This is the GPL version of PyQt 5.4.1 (licensed under the GNU General Public
License) for Python 2.7.6 on linux2.

Type ‘L‘ to view the license.
Type ‘yes‘ to accept the terms of the license.
Type ‘no‘ to decline the terms of the license.

Do you accept the terms of the license? yes
Found the license file pyqt-gpl.sip.
Error: Make sure you have a working sip on your PATH or use the --sip argument
to explicitly specify a working sip.

           

1
2
3
4
5
6
7
8
9
10
11
you need to install sip first (not just configure it)
 
begueradj @begueradj :~/Bureau/sip-4.16.7 # python configure.py
begueradj @begueradj :~/Bureau/sip-4.16.7 # make
begueradj @begueradj :~/Bureau/sip-4.16.7 # make install
 
and next you can install PyQt :
 
begueradj @begueradj :~/Bureau/PyQt-gpl-5.4.1 # python configure-ng.py
 
begueradj @begueradj :~/Bureau/PyQt-gpl-5.4.1 # python configure-ng.py --sip /usr/bin/sip

In file included from greenlet.c:5:0:

greenlet.h:8:20: 致命错误: Python.h:没有那个文件或目录

编译中断。

error: Setup script exited with error: command ‘gcc‘ failed with exit status 1

解决方法是安装python-dev,这是Python的头文件和静态库包:

sudo apt-get install python-dev




ubuntu 15.10下安装PyQt5

标签:

原文地址:http://my.oschina.net/Alexmyj/blog/528307

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!