如何为 Python 2.7 安装 Pyside?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/23576028/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to install Pyside for Python 2.7?
提问by zzirrgrizz
Hey I am pretty new to Pyside and am not sure how to download it or Qt? I have a 64-bit Windows computer and am wondering what I need to download once I have downloaded Qt because there is a checklist for like Qt 5.3, Qt 5.2.1, etc. and I am not sure which to download because under those there are multiple options under them like MSCV2012 64-bit and mscv64-bit OpenGL. Basically I am just very lost on what I need and can't seem to find the answer. Could someone enlighten me?
嘿,我是 Pyside 的新手,不知道如何下载它或 Qt?我有一台 64 位 Windows 计算机,想知道下载 Qt 后我需要下载什么,因为有一个像 Qt 5.3、Qt 5.2.1 等的清单,但我不确定要下载哪个,因为在那里它们下有多个选项,如 MSCV2012 64 位和 mscv64 位 OpenGL。基本上我只是对我需要的东西很迷茫,似乎找不到答案。有人可以启发我吗?
Thanks!
谢谢!
回答by Andy
回答by naheed
Install pip:
安装点:
- Download pip installer from hereand save it in a directory other than C.
- If you haven't set your python path: follow this.
- Open Command Prompt and cd to that directory where you saved the pip installer.
- run:
python get-pip.py
- 从这里下载 pip 安装程序并将其保存在 C 以外的目录中。
- 如果你还没有设置你的 python 路径:按照这个。
- 打开命令提示符并 cd 到您保存 pip 安装程序的那个目录。
- 跑:
python get-pip.py
Install pyside:
安装pyside:
- Close and Reopen Command Prompt.
- run:
cd C:\Python27\Scripts
- run:
pip install -U PySide
- 关闭并重新打开命令提示符。
- 跑:
cd C:\Python27\Scripts
- 跑:
pip install -U PySide
回答by lpapp
All the steps are mentioned in here, but for your convenience, here goes it inline:
所有步骤都在这里提到,但为了您的方便,这里是内联的:
Installing prerequisites
Install latest pip distribution: download get-pip.py [bootstrap.pypa.io] and run it using the python interpreter. Installing PySide on a Windows System
To install PySide on Windows you can choose from the following options:
安装先决条件
安装最新的 pip 发行版:下载 get-pip.py [bootstrap.pypa.io] 并使用 python 解释器运行它。在 Windows 系统上安装 PySide
要在 Windows 上安装 PySide,您可以从以下选项中进行选择:
Use pip [pypi.python.org] to install the wheel binary packages by issuing the command:
pip install -U PySide
Use setuptools [pypi.python.org] to install the egg binary packages by issuing the command (deprecated):
easy_install -U PySide
Download and install the packages from the PyPI page [pypi.python.org]
Provided binaries are without any other external dependencies. All required Qt libraries, development tools and examples are included.
提供的二进制文件没有任何其他外部依赖项。包括所有必需的 Qt 库、开发工具和示例。
Then, you can grab the Qt 4.8.6 version from here:
然后,您可以从这里获取 Qt 4.8.6 版本:
http://qt-project.org/downloads
http://qt-project.org/downloads
Please note that there is no installer for VS2012 off-hand, so you should use an older version or mingw. Alternatively, you could also build Qt 4 yourself.
请注意,没有现成的 VS2012 安装程序,因此您应该使用旧版本或 mingw。或者,您也可以自己构建 Qt 4。