【问题标题】:Installing PySide - Windows 8安装 PySide - Windows 8
【发布时间】: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


【解决方案1】:

PySide 现已在 pip 上可用,您可以使用 pip 命令简单地安装它

pip install PySide

Python Installer 2.7.9 及更高版本(在 python2 系列上),Python 3.4 及更高版本默认包含 pip(pip3 for Python 3)。但请记住在命令行窗口 (Windows+R) 中运行之前将其添加到“PATH”环境变量中。Python Install

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-05-02
    • 2011-01-12
    • 1970-01-01
    • 1970-01-01
    • 2014-01-02
    • 2016-12-19
    • 2021-10-09
    • 1970-01-01
    相关资源
    最近更新 更多