qdrant / qdrant-client

Python client for Qdrant vector search engine
https://qdrant.tech
Apache License 2.0
798 stars 121 forks source link

bug: qdrant using poetry #680

Open vikyw89 opened 4 months ago

vikyw89 commented 4 months ago

trigger, install qdrant using poetry poetry add qdrant_client

error: Note: This error originates from the build backend, and is likely not a problem with poetry but with grpcio-tools (1.48.2) not supporting PEP 517 builds. You can verify this by running 'pip wheel --no-cache-dir --use-pep517 "grpcio-tools (==1.48.2)"'.

joein commented 4 months ago

hi @vikyw89

could you please provide more details on your environment and the commands you ran to install qdrant-client?

I've tried this commands: pyenv local 3.10 && python3 -m venv venv && source venv/bin/activate && pip3 install -U pip && poetry init poetry add qdrant-client

it worked and installed grpcio-tools==1.64.1

vikyw89 commented 4 months ago

I'm on ubuntu 24

The command was:

poetry init
poetry add qdrant-client

I managed to install it by specifying the grpcio-tools version

Also why are you using pyenv and venv and poetry all at the same time ?

joein commented 4 months ago

it normally should not crush with this error, maybe you have some other dependencies which led to this error (due to the version resolution)

in order to investigate it, we could start with the python version you're using and the list of dependencies (the other requirements in your pyproject.toml)

joein commented 4 months ago

I'm on ubuntu 24

The command was: poetry add qdrant-client

I managed to install it by specifying the grpcio-tools version

Also why are you using pyenv and venv and poetry all at the same time ?

that's just the matter of taste

vikyw89 commented 4 months ago

Will you get a nested env with those long command line ?

I'll send my .toml tomorrow,

Dependency management in python is so problematic

joein commented 4 months ago

no, it results in a regular env

camba1 commented 1 month ago

I run into the same issue whether installing qdrant_client or langchain-qdrant.

Command: Poetry add langchain-qdrant

Interestingly enough, the first thing it tries to do is try to downgrade the version of protobuf and grpcio-tools for some reason:

Package operations: 1 install, 2 updates, 0 removals

  - Downgrading protobuf (5.28.2 -> 3.19.6)
  - Downgrading grpcio-tools (1.66.1 -> 1.48.2): Failed

  ChefBuildError

  Backend subprocess exited when trying to invoke build_wheel

Env details

Mac OS

Python 3.12.3

Poetry project dependencies:

uvicorn = "^0.23.2" pydantic = {extras = ["email"], version = "<3"} pypdf = "^4.2.0" langchain = "^0.3.0" langchain-community = "^0.3.0" transformers = "4.43.3" langchain-openai = "^0.2.0" langchainhub = "^0.1.20" sentence-transformers = "^3.0.1" langgraph = "^0.2.22" langchain-groq = "^0.2.0" langchain-huggingface = "^0.1.0" accelerate = "^0.32.1" sd-embed = {git = "https://github.com/xhinker/sd_embed.git", rev = "main"} python-arango = "^8.0.0" python-multipart = "^0.0.9" cryptography = "^43.0.0" pyjwt = "^2.9.0" parler-tts = {git = "https://github.com/huggingface/parler-tts.git"} diffusers = "^0.30.2" fal-client = "^0.4.1" langserve = {extras = ["server"], version = "^0.3.0"} pydantic-settings = "^2.5.2"

derevyan commented 1 month ago

Same stuff.