Skip to content

Unable to install llama-cpp-python with poetry #9656

@PierreCarceller

Description

@PierreCarceller

Issue Kind

Brand new capability

Description

Based on the llama-cpp-python installation documentation, if we want to install the lib with CUDA support (for example) we have 2 options :

Pass a CMAKE env var :

CMAKE_ARGS="-DGGML_CUDA=on" pip install llama-cpp-python

Or use the --config-settings argument of pip like this :

pip install llama-cpp-python --config-settings cmake.args="-DGGML_CUDA=on"

As far as I know, it's not possible to do something equivalent with poetry because :

  • It's not possible to pass env var to poetry
  • Poetry has no equivalent to --config-settings

I saw that there had already been conversations on similar subject here but they date from a while and maybe things have changed in the meantime?

I understand that pip and poetry are two different projects with different objectives, but it would be really useful (from my point of view) to be able to handle this kind of installation.

Impact

As I see it, llama-cpp-python will become an important lib in the python ecosystem (it probably already is to some extent).

In addition, llama-cpp-python is not the only one to use the --config-settings functionality for installation.

That's why I think it would be interesting to be able to allow a fluid installation with poetry.

Workarounds

There is a workaround as explained here

poetry run pip install llama-cpp-python --upgrade --force-reinstall --no-cache-dir

But it's not very practical because it breaks the poetry workflow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureFeature requests/implementationsstatus/triageThis issue needs to be triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions