为什么我无法从 pypi 安装 PyQt5?

2024-02-10

我想在pycharm中使用PyQt5。尝试从可用软件包安装软件包后,出现错误:“安装软件包失败:安装软件包 PyQt5 时发生错误。”
完整的日志在这里:

------------------------------------------------------------
C:\Program Files (x86)\JetBrains\PyCharm 3.0.1\helpers\packaging_tool.py run on 02/05/14 16:13:23
Downloading/unpacking PyQt5

  Getting page https://pypi.python.org/simple/PyQt5/
  URLs to search for versions for PyQt5:
  * https://pypi.python.org/simple/PyQt5/
  Analyzing links from page https://pypi.python.org/simple/PyQt5/
  Could not find any downloads that satisfy the requirement PyQt5

No distributions at all found for PyQt5

Exception information:
Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\pip-1.3.1-py2.7.egg\pip\basecommand.py", line 139, in main
    status = self.run(options, args)
  File "C:\Python27\lib\site-packages\pip-1.3.1-py2.7.egg\pip\commands\install.py", line 266, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "C:\Python27\lib\site-packages\pip-1.3.1-py2.7.egg\pip\req.py", line 1026, in prepare_files
    url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
  File "C:\Python27\lib\site-packages\pip-1.3.1-py2.7.egg\pip\index.py", line 171, in find_requirement
    raise DistributionNotFound('No distributions at all found for %s' % req)
DistributionNotFound: No distributions at all found for PyQt5

我应该怎么办?

这就是我所做的:

  • 安装Python 3.3并添加到PATH
  • 已安装PyQt5-5.2-gpl-Py3.3-Qt5.2.0-x64.exe

而且我不知道如何使用PyQt在pycharm中。
你能提供更多信息吗?


AFAIK,您无法从 PyPI 安装 PyQt4/PyQt5。您必须单独安装它。

如果你看到this https://pypi.python.org/simple/PyQt5/链接,您可以看到 PyPI 上没有列出 PyQt5(同样适用于 PyQt4)的软件包。因此,您需要单独下载安装程序here http://www.riverbankcomputing.com/software/pyqt/download5并安装它。

这就是

DistributionNotFound:根本没有找到 PyQt5 的发行版

指。

[更新]:您很可能还需要以相同的方式安装 sip,具体方法如下:https://askubuntu.com/a/666336/12214 https://askubuntu.com/a/666336/12214

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

为什么我无法从 pypi 安装 PyQt5? 的相关文章

随机推荐