cdanielmachado / carveme

CarveMe: genome-scale metabolic model reconstruction
Other
158 stars 52 forks source link

SyntaxError: unqualified exec is not allowed in function 'get_ode' #28

Closed thh32 closed 6 years ago

thh32 commented 6 years ago

Carveme installed fine with no errors, however when I run it the following occurs;

Command; carve genome.faa --output genome.model.xml

Traceback (most recent call last): File "/usr/local/bin/carve", line 4, in from carveme import config, project_dir File "/usr/local/lib/python2.7/dist-packages/carveme/init.py", line 5, in from framed import set_default_solver, set_default_parameter, Parameter File "/usr/local/lib/python2.7/dist-packages/framed/init.py", line 14, in from .io.sbml import load_sbml_model, load_cbmodel, load_odemodel, save_cbmodel, save_sbml_model File "/usr/local/lib/python2.7/dist-packages/framed/io/sbml.py", line 12, in from ..model.odemodel import ODEModel File "/usr/local/lib/python2.7/dist-packages/framed/model/odemodel.py", line 208 exec('from math import log', globals()) SyntaxError: unqualified exec is not allowed in function 'get_ode' it contains a nested function with free variables

Any idea how to solve this error? Python version is 2.7.6

cdanielmachado commented 6 years ago

Hi, this seems to be a python bug: https://bugs.python.org/issue21591

Can you upgrade your python to a more recent version? On 2.7.14 it seems to work fine.