Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot solve environemnt #2455

Closed
2 tasks done
ghost opened this issue Nov 11, 2024 · 7 comments
Closed
2 tasks done

Cannot solve environemnt #2455

ghost opened this issue Nov 11, 2024 · 7 comments

Comments

@ghost
Copy link

ghost commented Nov 11, 2024

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

[project]
name = "mypkg"
requires-python = ">=3.9,<3.12"
dynamic = ["version"]
dependencies = [
    "py-wake>=2.6.5,<3",
    "jupyterlab>=4.2.5,<5",
    "pydoe3>=1.0.4,<2",
    "pydoe2>=1.3.0,<2",
    "tensorflow>=2.13.1,<3",
    "shapely>=2.0.6,<3",
    "openmdao<=3.26",
    "matplotlib>=3.7.5,<4",
    "numpy>=1.24.3,<2",
    "numpy-financial>=1.0.0,<2",
    "scipy>=1.10.1,<2",
    "scikit-learn>=1.3.2,<2",
]

[build-system]
build-backend = "hatchling.build"
requires = ["hatchling", "hatch-vcs"]

[tool.pixi.project]
channels = ["conda-forge"]
platforms = ["linux-64", "win-64"] # TODO: add macOS

[tool.pixi.dependencies]
pyoptsparse = ">=2.11.3,<3"
pytest-xdist = ">=3.6.1,<4"
pytest = ">=8.3.3,<9"
pycodestyle = ">=2.12.1,<3"
pytest-cov = ">=5.0.0,<6"
sphinx = ">=7.4.7,<8"
sphinx_rtd_theme = ">=3.0.1,<4"
mock = ">=5.1.0,<6"
autopep8 = ">=2.3.1,<3"
git = ">=2.47.0,<3"
pre-commit = ">=4.0.1,<5"
pip = ">=24.3.1,<25"
make = ">=4.4.1,<5"
pandoc = ">=3.5,<4"
pypandoc = ">=1.14,<2"
nbsphinx = ">=0.9.5,<0.10"
nbconvert = ">=7.16.4,<8"

[tool.pixi.pypi-dependencies]
hatch = "*"
hatchling = ">=1.26"

Install gives:

$ pixi install
  × failed to solve the pypi requirements of 'default' 'linux-64'
  ├─▶ failed to resolve pypi dependencies
  ╰─▶ Because hatchling==1.26.1 depends on packaging>=24.2 and
      packaging==24.1, we can conclude that hatchling==1.26.1 cannot
      be used. (1)
      
      Because hatchling==1.26.0 was yanked (reason: Incompatible
      with currently released Hatch) and only the following versions
      of hatchling are available:
          hatchling<=1.26.0
          hatchling==1.26.1
      we can conclude that hatchling>=1.26.0,<1.26.1 cannot be used.
      And because we know from (1) that hatchling==1.26.1 cannot be
      used, we can conclude that hatchling>=1.26.0 cannot be used.
      And because you require hatchling>=1.26, we can conclude that
      your requirements are unsatisfiable.

Issue description

Not sure if that's pixi problem or related to the latest hatchling = ">=1.26" release. They fixed a problem in the new version, but cannot add it to environment...

Expected behavior

Resolution of environment

@ruben-arts
Copy link
Contributor

You can try adding packaging = ">24.2" to the [tool.pixi.dependencies] and because it now got 24.1 from the conda dependencies.

pixi add "packaging>24.2"

@ghost
Copy link
Author

ghost commented Nov 11, 2024

if I comment out the hatch dep and do pixi add "packaging>24.2" it does not obey this and simply adds packaging = ">=24.1,<25"

and with hatch it fails with the same error as before...

@ruben-arts
Copy link
Contributor

Oh I see, conda-forge doesn't support packaging > 24.1 yet. This mostlikely will be solved in a short time: conda-forge/packaging-feedstock#31

@ghost
Copy link
Author

ghost commented Nov 12, 2024

How come putting this under pypi deps, doesn't get resolved?

packaging = ">=24.2"
hatch = ">=1.13.0,<2"
hatchling = ">=1.26"

Because all of these are available there...

@ruben-arts
Copy link
Contributor

This is the conda-pypi-map feature, what you might have seen is that you break your installation with pip as it would install packages already installed by e.g. apt or conda. Pixi avoids this by not overwriting the packaging installed by conda by the packaging you install with pypi.

The error you're getting is indeed not helpful if you aren't familiar with the issue. We should improve this!

@matthewfeickert
Copy link
Contributor

Oh I see, conda-forge doesn't support packaging > 24.1 yet. This mostlikely will be solved in a short time: conda-forge/packaging-feedstock#31

That's merged now. Can you try again?

@ghost
Copy link
Author

ghost commented Nov 13, 2024

Solved ! Thanks for the update

@ghost ghost closed this as completed Nov 13, 2024
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants