【发布时间】:2013-04-22 00:47:13
【问题描述】:
按照这些说明进行操作:
http://qt-project.org/wiki/Setting_up_PySide
成功安装了这些程序:
- PySide-1.1.2.win-amd64-py2.7.exe -
- qt-win-opensource-4.8.4-vs2010.exe - 适用于 Windows 的 Qt 库 4.8.4(VS 2010,234 MB)
尝试了以下方法并得到了错误:
PS C:\Windows\system32> python
Python 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import PySide
>>> print(PySide.QtCore.__version__)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'QtCore'
我正在运行 Windows 8(64 位)。我以管理员身份从 powershell 运行上述命令。
【问题讨论】:
-
使用
import PySide.QtCore而不是import PySide。 -
@Blender,谢谢,那行得通。说明页面可能应该这么说。
标签: python windows qt windows-8 pyside