Skip to content

uv lock/add selects package versions not available for current platform #8603

@per11235813

Description

@per11235813

First, I would like to thank you for uv, it is just awesome, but I do have a problem

The pyqt5 package has different versions available for linux and windows, Linux:

$ pip index versions pyqt5-qt5
pyqt5-qt5 (5.15.15)
Available versions: 5.15.15, 5.15.14, 5.15.2

and Windows:

(Notes) > pip index versions pyqt5-qt5
pyqt5-qt5 (5.15.2)
Available versions: 5.15.2

On windows uv lock wants to use 5.15.15, which is not available so I get a lock file that does not work on Windows. uv add fails with similar logic:

> uv add pyqt5-qt5            
Resolved 2 packages in 762ms
error: distribution pyqt5-qt5==5.15.15 @ registry+https://pypi.org/simple can't be installed because it doesn't have a source distribution or wheel for the current platform

Are there any way to specify a platform requirement for package selection for uv lock and uv add?

For now I use uv pip compile and uv pip sync.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionAsking for clarification or support

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions