Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

python 2.7: no module named configparser

I'm trying to run db_create.py in Flask, and am getting the following error:

from six.moves.configparser import ConfigParser
ImportError: No module named configparser

Even after a successfull pip install, the same error code comes up.

I'm seeing solutions targeting Python 3, but not lower.

like image 444
fstopzero Avatar asked Jul 27 '15 20:07

fstopzero


1 Answers

For anyone following along, this was likely caused by an old (broken) version of the six module, e.g. see https://github.com/Parsely/streamparse/issues/113, for instance

which caused six.moves to be almost empty (contained no configparser module)

The fix was to upgrade the version of six used.

like image 72
lemonhead Avatar answered Oct 03 '22 17:10

lemonhead