为什么我不能从pypi安装PyQt5 ?

时间:2021-09-24 22:59:56

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:

我想用PyQt5的pycharm。在尝试从可用包中安装包之后,会出现一个错误:“安装包失败:安装包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

What should I do?

我应该做什么?

This is what I've done is this:

我所做的是:

  • Installed Python 3.3 and added to PATH
  • 安装Python 3.3并添加到PATH中
  • Installed PyQt5-5.2-gpl-Py3.3-Qt5.2.0-x64.exe
  • 安装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?

我不知道PyQt在pycharm里怎么用。你能提供更多的信息吗?

1 个解决方案

#1


4  

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

AFAIK,无法从PyPI安装PyQt4/PyQt5。你必须分开安装。

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.

如果您看到这个链接,您可以看到PyQt5(同样是PyQt4)在PyPI上没有列出的包。因此,您需要从这里单独下载安装程序并安装它。

That is what the

这就是

DistributionNotFound: No distributions at all found for PyQt5

分布没有发现:在PyQt5中没有发现分布。

refers to.

是指。

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

[更新]:您也可能需要以同样的方式安装sip: https://askubuntu.com/a/666336/12214

#1


4  

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

AFAIK,无法从PyPI安装PyQt4/PyQt5。你必须分开安装。

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.

如果您看到这个链接,您可以看到PyQt5(同样是PyQt4)在PyPI上没有列出的包。因此,您需要从这里单独下载安装程序并安装它。

That is what the

这就是

DistributionNotFound: No distributions at all found for PyQt5

分布没有发现:在PyQt5中没有发现分布。

refers to.

是指。

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

[更新]:您也可能需要以同样的方式安装sip: https://askubuntu.com/a/666336/12214