我正在尝试使用mac和M1芯片以及Python3.9.12安装M1。我怀疑M1芯片可能是原因。
我得到一个错误metadata-generation-failed。
最小工作示例
# directly in the terminal
pip install --no-cache-dir PyQt5==5.14.1或者将下面的行添加到requirements.txt中
# necessary for jupyter-notebook so added to requirements.txt
# then run: pip install -r requirements.txt
pyqt5==5.14.1 # missing in conda-forge我的尝试
我也尝试使用下面的解决方案,但没有效果。自制软件还声称安装了pyqt,这是很奇怪的。
pip install pyqt5brew install pyqt5requirements.txt,然后运行pip install -r requirements.txt相关问题
发布于 2022-08-07 16:29:56
为了进行故障排除,您能否运行:
# Make sure python3 points to your Python 3.9.12
python3 -m venv /tmp/venv
source /tmp/venv/bin/activate
pip install --no-cache-dir PyQt5==5.14.1
# If last step fails and complains about `pip` version, upgrade `pip` and try `pip install ..` again如果PyQt5安装成功,那么您肯定这不是M1芯片的问题。然后你可以尝试:
python3 -m pip install --no-cache-dir PyQt5==5.14.1发布于 2022-08-11 13:13:35
这可能真的是一个M1问题。我认为这是一个类似的问题:如何在mac上使用pyqt5运行M1chip?
但是,从源代码构建PyQt5包可能是一个更好的解决方案:从源头构建PyQt5
我还找到了这个脚本,有人在M1 Mac:在PyQt6上构建M1上构建并安装了M1。可以修改此脚本以构建PyQt5。
编辑:考虑使用PyQt6 (pip install PyQt6)。它已经在pypi上构建了一个universal2。
https://stackoverflow.com/questions/73068818
复制相似问题