python 2.7: no module named configparser

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.


I am using CENTOS RHEL 7 with Python 2.7.5 & pip version 8.1.2 and and fixed it doing:

cd /home/user/
sudo pip install configparser

And it was done for me. But Previously i had installed:

cd /home/user/
pip install --user pytz requests tqdm tzlocal python-dateutil

No problems at all.

to know your python version and to know configparser check up:

python --version

python -c 'import six; print(six.__version__)'

python -c 'import six.moves; print(dir(six.moves))'

I had configparser installed previously but I was not working so I think you must install all the dependencies and libs of python pip on your /home/user_directory