JeschkeLab/DeerLab

Support for Python 3.11

HKaras opened this issue · 1 comments

Python 3.11 was released on Oct. 24th, 2022, a little over 2 months ago. Python 3.11, is increasingly becoming the standard version for new installs and also has some key advantages over previous versions. Currently, DeerLab does not support Python 3.11 and the builds are failing. We should investigate this further and try and get it to build.

If we can not get it to build soon, we should modify the installation requirements to require Python <3.11. Currently, if you try to install DeerLab from PyPI on Python 3.11, it will attempt to but fail with a long error message. This could be very confusing for non-expert users.

DeerLab's own source code should be compatible with python 3.11, however not all its dependencies are. Currently the quadprog package is the hold out. Looking at its GitHub shows that the 3.11 issues was reported in October with a workaround, but the developers do not seem to be very active. Further investigations are required.

Status update:

Currently, support for Python 3.11 is being held up by the convex optimisation packages.

CVXOPT is still missing Python 3.11 wheels, but after 1.0 is an entierly unnecessary dependency. It is removed as a dependecy in #424

quadprog is also missing Python 3.11 wheels, and the maintainers of the package have not responded to any pull requests or issues on this topic. With a minor change on my fork I have sucseeded in building the wheels and installing it on 3.11. Other users can install quadprog from my fork with:

python -m pip install 'quadprog @ git+https://github.com/hkaras/quadprog

In the longer term we must consider if quadprog is the best choice for a default convex optimiser. Whilst it seems to be both the fastest and the most robust. A lack of python 3.11 support is increasingly becoming an issue. However the most obvious alternative CVXOPT is not any better at the moment. One option for us could be to include convex optimisation directly inside DeerLab so we do not have to rely on external packages.