prefix-dev / pixi

Package management made easy
https://pixi.sh
BSD 3-Clause "New" or "Revised" License
2.18k stars 132 forks source link

Support `--no-deps` option for pypi dependencies #1417

Open lucifer1004 opened 1 month ago

lucifer1004 commented 1 month ago

Problem description

--no-deps is not currently available. Hope it can be added.

ruben-arts commented 1 month ago

Do you have an example use case in a pixi environment?

lucifer1004 commented 1 month ago

For example, I want to install PyTorch via pip yet using locally installed versions of cuDNN and so on.

ruben-arts commented 1 month ago

If you mean with local that you want to install it with conda dependencies we are aware that our mapping is not perfect yet as it can only map real python packages to conda packages and not "non-python" wheels like cudnn. But I don't see a reason for pixi to support depending on packages local to your machine yet.

wolfv commented 1 month ago

@ruben-arts I think you are misunderstanding. If someone is developing on cudnn then they don't want that dependency to be overridden by the pypi installation.

This can be achieved with --no-deps so that you only update the pytorch package, but don't modify the (existing) cudnn package. This is unrelated to the conda <-> pypi mapping.

Mamba / Conda / Pip also have this functionality.

The way I imagine this to work would be something like

foo = { version = "0.3.0", no-deps = true }
ruben-arts commented 1 month ago

Aah yes that makes more sense, thanks for the clarification @wolfv

lucifer1004 commented 1 month ago

@wolfv Thank you for the clarification.

foo = { version = "0.3.0", no-deps = true }

is exactly what I am asking for.