Skip to content

pyqt5 版本的问题【解决方案供参考】 #239

@12Tall

Description

@12Tall

Windows 平台

  1. 通过pip 安装PPOCRLabel 无法启动,
  2. 克隆项目,通过uv sync 安装依赖失败,报以下错误:
> uv sync
Using CPython 3.12.4 interpreter at: C:\Program Files\Python312\python.exe
Creating virtual environment at: .venv
Resolved 78 packages in 4.05s
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`; consider adding your platform to `tool.uv.required-environments` to ensure uv resolves to a version with compatible wheels

通过给pyproject.toml 添加下面配置解决问题:

[tool.uv]
constraint-dependencies = ["pyqt5-qt5 <=5.15.2"]

参考:astral-sh/uv#7005

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions