Skip to content

Unable to solve mixture of Google SDK PyPI and Conda dependencies #5917

@twrightsman-heritable

Description

@twrightsman-heritable

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 shell --environment development
  ⠁ default:linux-aarch6 [00:00:00] resolving google-auth==2.49.2                                                                                                                                                    Error:   × failed to solve the pypi requirements of environment 'default' for platform 'linux-64'
  ├─▶ failed to resolve pypi dependencies
  ╰─▶ Because google-cloud-run==0.16.0 depends on grpcio>=1.75.1,<2.0.0 and grpcio==565.0.0, we can conclude that google-cloud-run==0.16.0 cannot be used.
      And because only google-cloud-run<=0.16.0 is available and you require google-cloud-run>=0.16.0, we can conclude that your requirements are unsatisfiable.
  help: The following PyPI packages have been pinned by the conda solve, and this version may be causing a conflict:
        grpcio==565.0.0
        See https://pixi.sh/latest/concepts/conda_pypi/#pinned-package-conflicts for more information.

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

[build-system]
build-backend = "hatchling.build"
requires = ["hatchling >=1.27,<2"]

[project]
name = "some_package"
version = "0.1"
authors = [
    { name = "Travis Wrightsman", email = "travis@heritable.ag" },
]
description = "Some description"
requires-python = ">=3.10"
license = "MIT"
dependencies = [
    "google-cloud-run >=0.16.0,<0.17",
]

[tool.pixi.workspace]
channels = ["conda-forge"]
platforms = ["linux-64", "linux-aarch64"]

[tool.pixi.environments]
default = {features = [], solve-group = "default"}
development = {features = ["development"], solve-group = "default"}

[tool.pixi.feature.development.dependencies]
google-cloud-sdk = "=565"

pixi info output:

System                                                                                                                                                                                                               
------------                                                                                                                                                                                                         
       Pixi version: 0.67.0                                                                                                                                                                                          
        TLS backend: rustls                                                                                                                                                                                          
           Platform: linux-aarch64                                                                                                                                                                                   
   Virtual packages: __unix=0=0                                                                                                                                                                                      
                   : __linux=6.12.74=0                                                                                                                                                                               
                   : __glibc=2.41=0                                                                                                                                                                                  
                   : __archspec=1=aarch64                                                                                                                                                                            
          Cache dir: /home/twrightsman/.cache/rattler/cache                                                                                                                                                          
       Auth storage: /home/twrightsman/.rattler/credentials.json                                                                                                                                                     
   Config locations: No config files found                                                                                                                                                                           
                                                                                                                                                                                                                     
Global                                                                                                                                                                                                               
------------                                                                                                                                                                                                         
            Bin dir: /home/twrightsman/.pixi/bin                                                                                                                                                                     
    Environment dir: /home/twrightsman/.pixi/envs                                                                                                                                                                    
       Manifest dir: /home/twrightsman/.pixi/manifests/pixi-global.toml

Workspace                                                                                                                                                                                                            
------------                                                                                                                                                                                                         
               Name: some_package                                                                                                                                                                                    
            Version: 0.1                                                                                                                                                                                             
      Manifest file: /home/twrightsman/envs/test/pyproject.toml

Environments
------------
        Environment: default
           Features: default
        Solve group: default
           Channels: conda-forge
   Dependency count: 1
       Dependencies: python
  PyPI Dependencies: google-cloud-run
   Target platforms: linux-aarch64, linux-64
    Prefix location: /home/twrightsman/envs/test/.pixi/envs/default

        Environment: development
           Features: development, default
        Solve group: default
           Channels: conda-forge
   Dependency count: 2
       Dependencies: google-cloud-sdk, python
  PyPI Dependencies: google-cloud-run
   Target platforms: linux-64, linux-aarch64
    Prefix location: /home/twrightsman/envs/test/.pixi/envs/development

Issue description

This is a bit confusing for me since the feedstock of google-cloud-sdk doesn't define any requirements on other Google SDK packages, so I don't understand why Pixi is determining grpcio==565.0.0 as a requirement.

The following pixi.toml works as expected:

[workspace]
authors = ["Travis Wrightsman <travis@heritable.ag>"]
channels = ["conda-forge"]
name = "test"
platforms = ["linux-aarch64"]
version = "0.1.0"

[tasks]

[dependencies]
google-cloud-sdk = "=565"
google-cloud-run = "=0.16"

Expected behavior

gcloud CLI available in development environment (not through PyPI, but rather the Conda package).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions