Skip to content

Improve error message when trying to add a builtin module #18464

@ilazaric

Description

@ilazaric

Summary

$ uv add pickle
  x No solution found when resolving dependencies for split (markers: python_full_version >= '3.14' and sys_platform == 'win32'):
  `-> Because pickle was not found in the package registry and your project depends on pickle, we can conclude that your project's requirements are unsatisfiable.

      hint: While the active Python version is 3.13, the resolution failed for other Python versions supported by your project. Consider limiting your project's supported Python versions using `requires-python`.
  help: If you want to add the package regardless of the failed resolution, provide the `--frozen` flag to skip locking and syncing.
PROGRAM FAILED WITH EXIT CODE 1

pickle is not something we need to add, but the error is very unclear IMO
This was executed on Linux (Ubuntu 24.04 specifically), so seeing any mention of win32 is just strange

Example

$ uv add pickle
  x No solution found when resolving dependencies for split (markers: python_full_version >= '3.14' and sys_platform == 'win32'):
  `-> Because pickle was not found in the package registry and your project depends on pickle, we can conclude that your project's requirements are unsatisfiable.

      hint: While the active Python version is 3.13, the resolution failed for other Python versions supported by your project. Consider limiting your project's supported Python versions using `requires-python`.
  help: If you want to add the package regardless of the failed resolution, provide the `--frozen` flag to skip locking and syncing.
PROGRAM FAILED WITH EXIT CODE 1

Metadata

Metadata

Assignees

Labels

enhancementNew feature or improvement to existing functionalityerror messagesMessaging when something goes wrong

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions