简体   繁体   English

我不知道如何安装PyQt5

[英]I can't figure out how to install PyQt5

I am not a pro, just an amateur enthusiast trying to level up. 我不是专业人士,只是一个试图升级的业余爱好者。 Apparently I am missing something when it comes to installing PyQt5. 显然我在安装PyQt5方面缺少一些东西。 In the effort to do so I have gone through several versions of python, and screwed up PyCharm such that it basically doesn't run even my old stuff. 为了做到这一点,我经历了多个版本的python,并搞砸了PyCharm,使其甚至根本无法运行我的旧版本。

I currently have a 64 bit Python 3.5 and a 32 bit python 3.6 installed. 我目前安装了64位Python 3.5和32位python 3.6。 I couldn't figure out where the install file on the latest PyQt5 was, so I used an exe version: PyQt5-5.6-gpl-Py3.5-Qt5.6.0-x32-2.exe 我不知道最新的PyQt5上的安装文件在哪里,所以我使用了exe版本: PyQt5-5.6-gpl-Py3.5-Qt5.6.0-x32-2.exe

All appeared well, but after this step PyCharm wouldn't work, so I got it to rediscover Python again, but now I get the error: 一切似乎都很好,但是在执行此步骤之后,PyCharm无法正常工作,因此我再次使用它重新发现了Python,但是现在出现了错误:

Traceback (most recent call last):
File "C:/Users/RFC/PycharmProjects/PyQt_learning/test.py", line 2, in <module>
    from PyQt5 import QtCore, QtWidgets
ModuleNotFoundError: No module named 'PyQt5'

So, any help would be greatly appreciated! 因此,任何帮助将不胜感激!

The first thing I suggest you do is uninstall and redownload the exe. 我建议您做的第一件事是卸载并重新下载exe。 Also after checking the website I have discovered that this version of PyQt5 is only compatible with Python 3.5 not 3.6. 同样在检查网站后,我发现此版本的PyQt5仅与Python 3.5兼容而不与3.6兼容。

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

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