本文介绍了为什么我不能从 pypi 安装 PyQt5?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在 pycharm 中使用 PyQt5.尝试从可用包安装包后,出现错误提示:安装包失败:安装包 PyQt5 时发生错误."
完整的日志在这里:

------------------------------------------------------------C:\Program Files (x86)\JetBrains\PyCharm 3.0.1\helpers\packaging_tool.py 运行于 02/05/14 16:13:23下载/解压 PyQt5获取页面 https://pypi.python.org/simple/PyQt5/用于搜索 PyQt5 版本的 URL:* https://pypi.python.org/simple/PyQt5/分析页面 https://pypi.python.org/simple/PyQt5/中的链接找不到任何满足 PyQt5 要求的下载根本找不到 PyQt5 的分布异常信息:回溯(最近一次调用最后一次):文件C:\Python27\lib\site-packages\pip-1.3.1-py2.7.egg\pip\basecommand.py",第 139 行,在 mainstatus = self.run(options, args)文件C:\Python27\lib\site-packages\pip-1.3.1-py2.7.egg\pip\commands\install.py",第 266 行,运行中required_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)文件C:\Python27\lib\site-packages\pip-1.3.1-py2.7.egg\pip\req.py",第 1026 行,在 prepare_filesurl = finder.find_requirement(req_to_install, upgrade=self.upgrade)文件C:\Python27\lib\site-packages\pip-1.3.1-py2.7.egg\pip\index.py",第 171 行,在 find_requirement 中raise DistributionNotFound('没有找到 %s' % req 的分布)DistributionNotFound:根本找不到 PyQt5 的发行版

我该怎么办?

这就是我所做的:

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

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

解决方案

AFAIK,你不能从 PyPI 安装 PyQt4/PyQt5.您必须单独安装.

如果你看到这个链接,你可以看到没有列出的包PyPI 上的 PyQt5(对于 PyQt4 也是如此).因此,您需要从此处单独下载安装程序并安装.>

就是这样

DistributionNotFound:根本找不到 PyQt5 的发行版

指.

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

I want to use PyQt5 in pycharm. After trying to install the package from Available packages, an error says: 'Install packages failed: Error occurred when installing package PyQt5.'
The complete log is here:

------------------------------------------------------------
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

What should I do?

This is what I've done is this:

  • Installed Python 3.3 and added to PATH
  • Installed PyQt5-5.2-gpl-Py3.3-Qt5.2.0-x64.exe

And I don't know how to use PyQt in pycharm.
can you provide more information?

解决方案

AFAIK, you cannot install PyQt4/PyQt5 from PyPI. You would have to install it separately.

If you see this link, you can see that there are no listed packages for PyQt5 (likewise for PyQt4) on PyPI. So, you would need to download the installer separately from here and install it.

That is what the

refers to.

[UPDATE]: You'll also most likely need to install sip the same way, here's how: https://askubuntu.com/a/666336/12214

这篇关于为什么我不能从 pypi 安装 PyQt5?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-26 21:01