【问题标题】:Why do I keep getting errors when I try to install PySide2 on windows PC?为什么我尝试在 Windows PC 上安装 PySide2 时总是出错?
【发布时间】:2019-11-07 07:13:49
【问题描述】:

我一直在尝试在我的 PC (Windows 10 64bits) 上安装 PySide2 并安装了 Python 3.8,但我每次都遇到错误。

我使用了命令pip install PySide2。它不适合我。

我们将不胜感激。

错误:

ERROR: Could not find a version that satisfies the requirement pyside2 (from versions: none)
ERROR: No matching distribution found for pyside2

【问题讨论】:

  • windows 10 64 bitspython 3.7.3 中没有问题

标签: python python-3.x windows pip


【解决方案1】:

如果您检查pypi page 上的可用文件,您会看到cp35.cp36.cp37 只有轮子,所以python 3.5 到3.7,没有3.8 的文件。这就是pip 找不到版本的原因,因为pypi 上没有兼容的版本。

qt website 上也没有 python 3.8 版本

现在你有两个选择:

  1. 尝试按照官方docs从源代码安装(我不建议初学者这样做)
  2. 卸载 python 3.8 并安装 3.7 或使用带有 python 3.7 的虚拟环境(我建议这样做,因为您很可能不依赖 python 3.8 和 3.7 之间的区别)

更新

自从撰写上述答案以来,pyside2 的新版本已发布,如果您有python 3.8pip install 现在应该能够为pyside2 找到whl

【讨论】:

  • PySide2 5.14 版(支持 Python 3.8)即将发布。见this bugfix
  • @florisla 你是对的,我已将其添加到我的答案中
  • 不能在我的 Raspberry 上使用 Python 3.7.2;同样的错误,虽然该版本应该有一个轮子
  • @mep 不,在 pypi 上没有用于 arm 的轮子(这是覆盆子所基于的架构,对吗?),只有基于 x64 和 x86 的系统
  • 哦,其实是可以的。看到这个帖子:forum.qt.io/topic/112813/installing-pyside2-on-raspberry-pi
【解决方案2】:

5.14 版现已推出,支持 cp38,请参阅:http://download.qt.io/snapshots/ci/pyside/5.14/latest/pyside2/

【讨论】:

    【解决方案3】:

    对于任何试图在 Raspbian 上安装它的人(也许还有其他 Linux 系统):

    您可以使用以下命令安装 PySide2 而无需 pip wheel

    $sudo apt-get install python3-pyside2.qt3dcore python3-pyside2.qt3dinput python3-pyside2.qt3dlogic python3-pyside2.qt3drender python3-pyside2.qtcharts python3-pyside2.qtconcurrent python3-pyside2.qtcore python3-pyside2.qtgui python3-pyside2.qthelp python3-pyside2.qtlocation python3-pyside2.qtmultimedia python3-pyside2.qtmultimediawidgets python3-pyside2.qtnetwork python3-pyside2.qtopengl python3-pyside2.qtpositioning python3-pyside2.qtprintsupport python3-pyside2.qtqml python3-pyside2.qtquick python3-pyside2.qtquickwidgets python3-pyside2.qtscript python3-pyside2.qtscripttools python3-pyside2.qtsensors python3-pyside2.qtsql python3-pyside2.qtsvg python3-pyside2.qttest python3-pyside2.qttexttospeech python3-pyside2.qtuitools python3-pyside2.qtwebchannel python3-pyside2.qtwebsockets python3-pyside2.qtwidgets python3-pyside2.qtx11extras python3-pyside2.qtxml python3-pyside2.qtxmlpatterns python3-pyside2uic
    

    应该包括所有标准的 Qt 功能。我能够运行我的应用程序——它运行得非常好。

    以防万一 - 我来是因为我无法在 Raspbian 上通过 pip 安装它。

    如果您在 Raspberry Pi 上使用 ArchLinux,则应该可以使用工作轮。 请参阅此thread 了解更多信息。

    【讨论】:

      猜你喜欢
      • 2021-08-10
      • 2021-01-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-08-27
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多