Closed juhoinkinen closed 1 month ago
Scipy 1.14.0 was released last week, but seems it does not affect this: pinning Scipy version to 1.13.0 in the pyproject.toml
results in the same error.
Somehow Numpy 2.0 is the cause for this, as discussed in issue https://github.com/TA-Lib/ta-lib-python/issues/655 and resolved by https://github.com/TA-Lib/ta-lib-python/pull/656.
Maybe the same (temporary?) fix could be used for Gensim too?
Maybe the same (temporary?) fix could be used for Gensim too?
The fix, that is the constraint numpy <2.0 (along with the scipy version constraint), makes it possible to install and build gensim for Python 3.12 with Poetry; try this in pyproject.toml
:
gensim = { git = "https://github.com/juhoinkinen/gensim.git", branch = "develop" }
The constraint "numpy <2.0" is no more needed after the merge or PR #3538, so I close this. This in pyproject.toml
makes Docker build succeed:
gensim = { git = "https://github.com/piskvorky/gensim.git", branch = "develop" }
I guess it's because of the removal of "scipy<=1.13.1" from build dependencies.
Problem description
Installation of Gensim version 4.3.2 or current develop branch fails on Python 3.12 when using Poetry - when using pip there is no problem.
Noted this first from a failed run of our CI/CD pipeline, which installs v4.3.2. Two weeks ago it ran successfully.
Steps to reproduce
Success with pip
Run
or
The dependencies for the develop branch by pip are:
Fail with Poetry
Using this
Dockerfile
and this
pyproject.toml
to build and install current develop branch (or v4.3.2) with the command
the result is a failure at the following build step:
(I thought this was something to do with the Numpy 2.0 release, but the current develop branch has already pinned Numpy to <2.0. So it seems something else than Numpy is causing this.)
The dependencies by Poetry resolution are the same as by pip.
When using Python 3.11 the installation is successful with Poetry, and the dependencies are the same.
Versions
Python 3.12.4 Poetry 1.8.3