2013-04-22 98 views
0

按照這些指示:安裝PySide - Windows 8的

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 -Qt庫4.8.4 for Windows(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運行上述命令。

+3

使用'import PySide.QtCore'而不是'import PySide'。 – Blender 2013-04-22 00:53:39

+0

@Blender,謝謝,這工作。說明頁面應該可以這樣說。 – zzz 2013-04-22 00:59:48

回答

0

PySide可以用PIP現在,您可以通過使用PIP命令

pip install PySide 

Python安裝程序2.7.9後只需安裝它,後來(在python2系列),和Python 3.4和更高版本包括畫中畫( Python 3的pip3)。但請記住在命令行窗口(Windows + R)中運行它之前,將它添加到「PATH」環境變量中。 Python Install

C:\Python27\;C:\Python27\Scripts\