Unqualified exec is not allowed in function '_parse_config'

trying to install indico dev on centos 7 machine as non root user. got right to indico db prepare and got the following error - new to this so as much help as I can get would be really appreciated

Indico has been configured successfully!
You can now run indico db prepare to initialize your Indico database
(env) [centosdev@centos src]$ indico db prepare
.

File "/home/centosdev/dev/indico/src/indico/legacy/common/cache.py", line 27, in <module>
    from indico.core.config import config
  File "/home/centosdev/dev/indico/src/indico/core/config.py", line 153
    exec(compile(config_file.read(), path, 'exec'), globals_, locals_)
SyntaxError: unqualified exec is not allowed in function '_parse_config' it contains a nested function with free variables

Which Python version are you using? python --version

I am using version 2.7

Could you please show the full version? On 2.7.15 it’s working fine for me.

(env) [centosdev@centos src]$ python --version
Python 2.7.5
(env) [centosdev@centos src]$

Can you try replacing this line:

exec(compile(config_file.read(), path, 'exec'), globals_, locals_)

with this?

exec compile(config_file.read(), path, 'exec') in globals_, locals_

Ok - will give that ago - in config.py I assume - will let you know how I get on…

Thanks - that has worked so will now carry on to next step… again, thanks.

Thanks, I just pushed a fix so please update to the latest master.