简体   繁体   English

安装 PyQt5 时出错

[英]Errors while installing PyQt5

在此处输入图像描述

So I'm completely new to PyQt and I have absolutely no idea how to install, and run it.所以我对 PyQt 完全陌生,我完全不知道如何安装和运行它。 Most online sources are saying to simply write 'pip install pyqt5' in CMD, but I'm getting errors as listed in the photo link above.大多数在线资源都说在 CMD 中简单地编写“pip install pyqt5”,但我收到了上面照片链接中列出的错误。 I run python from Anaconda so I'm using that, but I don't see any issues with why it wouldn't work.我从 Anaconda 运行 python 所以我正在使用它,但我看不出它为什么不起作用的任何问题。 I tried to put the pyqt folder into the directory that the console was reading but the errors persist.我试图将 pyqt 文件夹放入控制台正在读取的目录中,但错误仍然存在。 Any ideas?有任何想法吗? Thanks!谢谢!

Errors: (base) C:\Users\TMNT5>pip install pyqt5 Collecting pyqt5 Using cached PyQt5-5.14.2-5.14.2-cp35.cp36.cp37.cp38-none-win_amd64.whl (52.9 MB) Requirement already satisfied: PyQt5-sip<13,>=12.7 in c:\users\tmnt5\anaconda3\lib\site-packages (from pyqt5) (12.7.2) ERROR: spyder 4.0.1 requires pyqtwebengine<5.13; Errors: (base) C:\Users\TMNT5>pip install pyqt5 Collecting pyqt5 Using cached PyQt5-5.14.2-5.14.2-cp35.cp36.cp37.cp38-none-win_amd64.whl (52.9 MB) Requirement already satisfied: PyQt5-sip<13,>=12.7 in c:\users\tmnt5\anaconda3\lib\site-packages (from pyqt5) (12.7.2) ERROR: spyder 4.0.1 requires pyqtwebengine<5.13; python_version >= "3", which is not installed. python_version >= "3",未安装。 ERROR: spyder 4.0.1 has requirement pyqt5<5.13;错误:spyder 4.0.1 有要求 pyqt5<5.13; python_version >= "3", but you'll have pyqt5 5.14.2 which is incompatible. python_version >= "3",但您将拥有不兼容的 pyqt5 5.14.2。 Installing collected packages: pyqt5 ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'C:\Users\TMNT5\anaconda3\Lib\site-packages\PyQt5\QtCore.pyd' Consider using the --user option or check the permissions.安装收集的包:pyqt5 错误:由于 EnvironmentError 无法安装包:[WinError 5] 访问被拒绝:'C:\Users\TMNT5\anaconda3\Lib\site-packages\PyQt5\QtCore.pyd' 考虑使用--user选项或检查权限。

It appears you're not using Python 3 to install PyQt5.看来您没有使用 Python 3 来安装 PyQt5。

pip install python-qt5

Installs unofficial PyQt5 via PyPI for Python 2.7 64-bit on Windows在 Windows 上通过 PyPI 为 Python 2.7 64 位安装非官方 PyQt5

Github for this here: https://github.com/pyqt/python-qt5 Github 在这里: https://github.com/pyqt/python-qt5

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

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