Skip to content

Specifying a python sub-version causes dependency resolution to fail #5205

@d9i

Description

@d9i

Checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pixi, using pixi --version.

Reproducible example

Commands I ran and their output:

$ pixi init --format pyproject
✔ Created /Users/d9i/Documents/Projects/pixitest/pyproject.toml

# Modify the pyproject.toml to specify `requires-python = "== 3.10.6"`

$ pixi install
Error:   × failed to solve the pypi requirements of environment 'default' for platform 'osx-arm64'
  ├─▶ failed to resolve pypi dependencies
  ╰─▶ Because the requested Python version (==3.10.*) does not satisfy Python==3.10.6 and pixitest==0.1.0 depends on Python==3.10.6, we can conclude that
      pixitest==0.1.0 cannot be used.
      And because only pixitest==0.1.0 is available and you require pixitest, we can conclude that your requirements are unsatisfiable.
      
      hint: The `requires-python` value (==3.10.*) includes Python versions that are not supported by your dependencies (e.g., pixitest==0.1.0 only supports
      ==3.10.6). Consider using a more restrictive `requires-python` value (like ==3.10.6).

pixi.toml/pyproject.toml file that reproduces my issue:

[project]
authors = [{name = "my name", email = "my_email@gmail.com"}]
dependencies = []
name = "pixitest"
requires-python = "== 3.10.6"
version = "0.1.0"

[build-system]
build-backend = "hatchling.build"
requires = ["hatchling"]

[tool.pixi.workspace]
channels = ["conda-forge"]
platforms = ["osx-arm64"]

[tool.pixi.pypi-dependencies]
pixitest = { path = ".", editable = true }

[tool.pixi.tasks]

pixi info output:

System
------------
       Pixi version: 0.62.2
        TLS backend: rustls
           Platform: osx-arm64
   Virtual packages: __unix=0=0
                   : __osx=26.1=0
                   : __archspec=1=m1
          Cache dir: /Users/d9i/Library/Caches/rattler/cache
       Auth storage: /Users/d9i/.rattler/credentials.json
   Config locations: No config files found

Global
------------
            Bin dir: /Users/d9i/.pixi/bin
    Environment dir: /Users/d9i/.pixi/envs
       Manifest dir: /Users/d9i/.pixi/manifests/pixi-global.toml

Workspace
------------
               Name: pixitest
            Version: 0.1.0
      Manifest file: /Users/d9i/Documents/Projects/pixitest/pyproject.toml

Environments
------------
        Environment: default
           Features: default
           Channels: conda-forge
   Dependency count: 1
       Dependencies: python
  PyPI Dependencies: pixitest
   Target platforms: osx-arm64
    Prefix location: /Users/d9i/Documents/Projects/pixitest/.pixi/envs/default

Other files (e.g. script files, source files, etc.):

Issue description

If I specify a requires-python value with more than one period in it, dependency resolution will fail. For some reason, pixi thinks my value is "== 3.10.*" but I have specified "== 3.10.6" -- might be some kind of mixup between pixi and uv? Or I could just be using the tool wrong.

Expected behavior

Successful environment build using the specified python version (3.10.6)

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingpypiIssue related to PyPI dependencies

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions