本文介绍了python 2.7:没有名为configparser的模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在Flask中运行

导致 six.moves 几乎为空(不包含 configparser module)

解决的办法是升级使用的 six 的版本。


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.

解决方案

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.

这篇关于python 2.7:没有名为configparser的模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-29 23:47
查看更多