langchain-ai / langchain-weaviate

MIT License
35 stars 15 forks source link

Cannot install on Python 3.13 #212

Open graipher opened 3 days ago

graipher commented 3 days ago

Describe the bug The version constraint of simsimd<5.0.0 prevents installing langchain-weaviate on Python >= 3.13, due to a bug in simsimd in v4.4.0 (and earlier).

Complete Minimal Reproducible Example Steps to reproduce the behavior:

  1. Try to install langchain-weaviate on any platform for which no wheels of simsimd==4.4.0 are available (e.g. Python 3.13, but also older or more rare setups).
  2. Get an error like this:
#13 0.112 Using CPython 3.13.0 interpreter at: /usr/local/bin/python3
#13 0.112 Creating virtual environment at: .venv
#13 0.861   × Failed to download and build `simsimd==4.4.0`
#13 0.861   ╰─▶ Build backend failed to determine requirements with `build_wheel()`
#13 0.861       (exit status: 1)
#13 0.861 
#13 0.861       [stderr]
#13 0.861       Traceback (most recent call last):
#13 0.861         File "<string>", line 14, in <module>
#13 0.861           requires = get_requires_for_build({})
#13 0.861         File
#13 0.861       "/root/.cache/uv/builds-v0/.tmpKjfYuY/lib/python3.13/site-packages/setuptools/build_meta.py",
#13 0.861       line 334, in get_requires_for_build_wheel
#13 0.861           return self._get_build_requires(config_settings, requirements=[])
#13 0.861                  ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#13 0.861         File
#13 0.861       "/root/.cache/uv/builds-v0/.tmpKjfYuY/lib/python3.13/site-packages/setuptools/build_meta.py",
#13 0.861       line 304, in _get_build_requires
#13 0.861           self.run_setup()
#13 0.861           ~~~~~~~~~~~~~~^^
#13 0.861         File
#13 0.861       "/root/.cache/uv/builds-v0/.tmpKjfYuY/lib/python3.13/site-packages/setuptools/build_meta.py",
#13 0.861       line 320, in run_setup
#13 0.861           exec(code, locals())
#13 0.861           ~~~~^^^^^^^^^^^^^^^^
#13 0.861         File "<string>", line 6, in <module>
#13 0.861           sys.path = [] + sys.path
#13 0.861                         ^^^^^^^^^^
#13 0.861       FileNotFoundError: [Errno 2] No such file or directory: 'VERSION'
#13 0.861 
#13 0.861   help: `simsimd` was included because `example-project==1.0.0` depends on
#13 0.861         `langchain-weaviate==0.0.3` which depends on `simsimd`

Expected behavior langchain-weaviate should be installable also in environments for which no pre-built simsimd wheels are available.

Tech Stack:

Additional context This bug was reported on the simsimd side in https://github.com/ashvardanian/SimSIMD/issues/150 and fixed in v5.0.0 (and then appeared again in https://github.com/ashvardanian/SimSIMD/issues/209 and fixed again in v5.7.1). The current version of simsimd is v6.0.5.

dudanogueira commented 3 days ago

hi @graipher !!

Thanks for the bug report. This is similar to this one: https://github.com/langchain-ai/langchain-weaviate/issues/208

Do you believe that the proposed solution could work for you if implemented?

graipher commented 3 days ago

@dudanogueira disabling simsimd (or rather making it optional) would be a work-around, but the much better solution would be to allow a newer version of the package, for which local wheel building is not broken.

I mean it is one thing saying that some niche platform is not fully supported, but this is the current Python version we are talking about.