- 
                Notifications
    
You must be signed in to change notification settings  - Fork 371
 
Description
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
The following pixi.toml
[project]
name = "pixi-test"
channels = ["conda-forge"]
platforms = ["linux-64"]
[dependencies]
scipy = "*"
[pypi-dependencies]
numpy = { git = "https://github.com/numpy/numpy.git", rev = "v2.3.0.dev0" }
Produces output:
Error:
  × failed to solve the pypi requirements of 'default' 'linux-64'
  ├─▶ failed to resolve pypi dependencies
  ╰─▶ Because there is no version of numpy==2.2.2 and you require numpy==2.2.2, we can conclude that your
      requirements are unsatisfiable.
Note that there is no requirement for numpy==2.2.2 specified anywhere in the project file; neither that version nor that package is an explicit requirement. (it is a dependency of SciPy)
For a second example, see openforcefield/openff-pablo#17
Issue description
Thanks for Pixi! I made a very amateurish tool with a similar vibe a few years ago and I'm very glad to see someone's taking the problem more seriously than I did.
Using a pypi dependency to grab a development branch through Git for a dependency we usually get through Conda fails. The error is quite confusing, as it says I require a version of a package I have never requested. This pattern works very simply in Conda environment.yaml files.
We often make use of this pattern to unblock progress on a downstream package while an upstream patch is merged or reviewed. It's useful because our dependencies change rarely and are generally very flexible in terms of their precise version requirements, but each package's repo only lists its dependencies in eclectic Conda environments. Using the Conda Forge package to get dependencies and just taking the leaf package from the Git repository works so often that its easy to forget that its a bit of a hack.
Expected behavior
The Conda environment would be solved as usual, and then the PyPi dependency installed over the top. If this is undesirable because the repository and Conda packages might have different dependencies or something, it'd be great to both have a clearer error and have some mechanism to install a branch from a Git repository for an existing Conda dependency, or some sort of "nodep"-like override for pypi dependencies that would allow them to be installed over a conda dependency. Thanks!