简体   繁体   English

使用python 3.4在Windows 7上安装PyQt 5

[英]installing PyQt 5 on windows 7 with python 3.4

I wanna install PyQt5 on windows by pip but rise me this error: 我想通过pip在Windows上安装PyQt5但是让我犯这个错误:

pip install PyQt5
Collecting PyQt5
  Using cached PyQt5-5.7.1-5.7.1-cp34.cp35.cp36.cp37-none-win32.whl
Collecting sip>=4.19 (from PyQt5)
  Could not find a version that satisfies the requirement sip>=4.19 (from PyQt5)
 (from versions: )
No matching distribution found for sip>=4.19 (from PyQt5)

and when i try to install sip via pip raise me this error: 当我尝试通过pip安装sip时提出我这个错误:

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

what can i do? 我能做什么?

You can use pip to install SIP and then pyQt5. 您可以使用pip安装SIP,然后使用pyQt5。

pip install SIP

But in order to be able to do that you need python 3.5 and its better to use virtualenv to not mess with core installation/change version. 但是为了能够做到这一点,你需要python 3.5,并且更好地使用virtualenv来解决核心安装/更改版本。

Then you can try installing PyQt5. 然后你可以尝试安装PyQt5。

pip install pyqt5
  • Make sure you have the latest python installed (or at least v3.5) 确保安装了最新的python(或至少v3.5)
  • Make sure your new python install is being used from your path instead of the old one ( python --version ) 确保你的新python安装正在使用你的路径而不是旧路径( python --version
  • pip3 install PyQt5 should then successfully install SIP and PyQt5 for you pip3 install PyQt5然后应该成功安装SIP和PyQt5

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM