我已经尝试了一百万种不同的方法来安装 PyQt5,但我不断收到相同的错误消息。我尝试在Python虚拟环境中安装它,但仍然没有成功。我尝试下载 Qt 以查看是否缺少任何依赖项,但它没有解决问题。我尝试过更新pip、使用Homebrew、下载源码等很多方法,但还是无法安装。我正在 MacOS 上工作。
\n这是我尝试过的示例:
\n(env) firstLast@name-MacBook-Pro project % pip install pyqt5 \n \nCollecting pyqt5\n Using cached PyQt5-5.15.9.tar.gz (3.2 MB)\n Installing build dependencies ... done\n Getting requirements to build wheel ... done\n Preparing metadata (pyproject.toml) ... error\n error: subprocess-exited-with-error\n \n \xc3\x97 Preparing metadata (pyproject.toml) did not run successfully.\n \xe2\x94\x82 exit code: 1\n \xe2\x95\xb0\xe2\x94\x80> [20 lines of output]\n Querying qmake about your Qt installation...\n Traceback (most recent call last):\n File "/Users/name/Documents/final_project/tfod/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>\n main()\n File …Run Code Online (Sandbox Code Playgroud)