NatLibFi / Annif

Annif is a multi-algorithm automated subject indexing tool for libraries, archives and museums.
https://annif.org
Other
188 stars 41 forks source link

Python 3.12 support #779

Open juhoinkinen opened 3 months ago

juhoinkinen commented 3 months ago

Python 3.12 was released last October, so we should try to support it in Annif.

Currently support is not possible because of the following (to be continued...):

juhoinkinen commented 3 months ago

Actually this was resolved by installing python3.12-dev system package, which was missing from my laptop.

juhoinkinen commented 3 months ago

As gensim can be installed, provided that the python3.12-dev system package is available, even currently it is possible to install Annif (or at least Poetry can resolve dependencies) if the unsupported dependencies are resctricted to Python <3.12, that is using this in pyproject.toml:

tensorflow-cpu = { version = "2.15.*", optional = true, python = "<3.12" }
stwfsapy = { version = "0.4.*", optional = true, python = "<3.12" }
osma commented 3 months ago

It looks like Ubuntu 24.04, to be released in April 2024, will come with Python 3.12. So it would be nice if we could support it soon. But of course, older Python versions can also be installed on Ubuntu.

juhoinkinen commented 3 months ago
tensorflow-cpu = { version = "2.15.*", optional = true, python = "<3.12" }

Also TensorFlow could be installed, if it could be upgraded to version 2.16.*, but this is blocked by https://github.com/tensorflow/tensorflow/issues/63585.

juhoinkinen commented 2 months ago

Not fully closed, because stwfsapy and NN ensemble do not work on Python 3.12.