问题
I'm trying to install and use PyQt5 on my Windows 10 computer. Actually, it's already installed but IDLE does not recognize the package.
I tried to import PyQt5 after I installed it but I got an import error. Then I tried something else:
pip install pyqt5
Here, I got a syntax error. Does anybody have an idea what's the problem? Thanks in advance.
回答1:
Installing Python 3.6.6 & PyQt5 on Windows (10)
Python3.6.6: Download & Install Python 3.6.6 https://www.python.org/downloads/windows/
PyQt5: From an elevated command prompt run:
- python -m pip install --upgrade pip
- pip install pyqt5
- pip install pyqt5-tools
- Add the pyqt5 environment variable to the system environment path like so:
Here is a youtube explaining the steps above
来源:https://stackoverflow.com/questions/54925099/idle-unable-to-find-pyqt5-installation