import cbmpy # noqa: F401
/usr/local/lib/python3.9/dist-packages/cbmpy/__init__.py:46: in <module>
from . import CBSolver
/usr/local/lib/python3.9/dist-packages/cbmpy/CBSolver.py:40: in <module>
from . import CBGLPK
/usr/local/lib/python3.9/dist-packages/cbmpy/CBGLPK.py:34: in <module>
if int(sympy.__version__.split('.')[1]) >= 7 and int(sympy.__version__.split('.')[2]) >= 4:
E IndexError: list index out of range
CBMPy assumes that the version number of sympy has three parts. However, the version sometimes only has two, such as the current version (
1.8
).The packaging package has methods for more safely working with version numbers. https://packaging.pypa.io/en/latest/version.html#packaging.version.parse
The current version of the code has the same issue. https://github.com/SystemsBioinformatics/cbmpy/blob/master/cbmpy/CBGLPK.py#L38