SystemsBioinformatics / cbmpy-metadraft

CBMPy Metadraft: a flexible and extensible genome-scale model reconstruction tool
https://systemsbioinformatics.github.io/cbmpy-metadraft/
GNU General Public License v3.0
2 stars 2 forks source link

IndexError: list out of range due to Sympy version #9

Open willigott opened 3 years ago

willigott commented 3 years ago

I just installed Metadraft following the instructions in the README (on Ubuntu).

When I execute

sh ./run.sh

I receive

Using Qt5 - the next generation
You are using BioPython 1.78
Traceback (most recent call last):
  File "metadraft.py", line 62, in <module>
    import libpython.qtmetadraft
  File "/stuff/cbmpy-metadraft/libpython/qtmetadraft.py", line 169, in <module>
    from . import biotools
  File "/stuff/cbmpy-metadraft/libpython/biotools.py", line 61, in <module>
    import cbmpy
  File "/stuff/anaconda3/envs/metadraft3/lib/python3.7/site-packages/cbmpy/__init__.py", line 48, in <module>
    from . import CBSolver
  File "/stuff/anaconda3/envs/metadraft3/lib/python3.7/site-packages/cbmpy/CBSolver.py", line 40, in <module>
    from . import CBGLPK
  File "/stuff/anaconda3/envs/metadraft3/lib/python3.7/site-packages/cbmpy/CBGLPK.py", line 38, in <module>
    and int(sympy.__version__.split('.')[2]) >= 4
IndexError: list index out of range

Reason is that Sympy 1.8 gets installed, therefore int(sympy.__version__.split('.')[2] is undefined.

A quick fix is to just run

conda install sympy=1.7.1

but I guess ideally it can be solved on code level.