paip.python qt 最新版本环境最佳实践
作者Attilax , EMAIL:1466519819@qq.com
来源:attilax的专栏
地址:http://blog.csdn.net/attilax
环境:xpsp3
1.下载
python-3.3.2.zip 19M
PyQt5-5.1.1-gpl-Py3.3-Qt5.1.1-x32.exe 28M
2.安装.:
先安装python...D:\Python33
在安装pyqt...正常情况下,PyQt5是安装在D:\Python33/Lib/site-packages/PyQt5
3.设置plugin 目录.
不个D:\Python33/Lib/site-packages/PyQt5/qt.conf文件复制到.D:\Python33....
不然运行的时候提示could not find or load the Qt platform plugin "windows".
-------qt.conf文件内容
[Paths]
Prefix = D:/Python33/Lib/site-packages/PyQt5
Binaries = D:/Python33/Lib/site-packages/PyQt5
4.建立halo world文件 halo.py
import sys
from PyQt5.QtCore import pyqtSignal, QObject, QSize, Qt, QUrl
from PyQt5.QtGui import QImage, QPainter
from PyQt5.QtWidgets import *
from PyQt5.QtWebKitWidgets import QWebPage
from PyQt5 import QtGui
app = QApplication(sys.argv)
label = QLabel("Hello Qt!")
label.show()
sys.exit(app.exec_())
5.运行...pythonw.exe halo.py