问题现象:
uv add PyQt5报错:
uv add PyQt5
Resolved 4 packages in 7ms
error: Distribution `pyqt5-qt5==5.15.18 @ registry+https://pypi.org/simple` can't be installed because it doesn't have a source distribution or wheel for the current platform
hint: You're on Windows (`win_amd64`), but `pyqt5-qt5` (v5.15.18) only has wheels for the following platforms: `manylinux2014_x86_64`, `macosx_10_13_x86_64`, `macosx_11_0_arm64`解决办法:
pyproject.toml 添加下面内容
[tool.uv]
constraint-dependencies = ["pyqt5-qt5 <=5.15.2"]再次执行uv add PyQt5,应该就好了