ImportError: No module named 'ConfigParser'
Posted liguangsunls
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ImportError: No module named 'ConfigParser'相关的知识,希望对你有一定的参考价值。
Resolve Method:
I found the problem. I had manually installed a newer version of python
(version
3.2 but the version installed through packages is 2.7) and I just redirected /usr/bin/python
to python3.2
.
Apparently in 3.2 some syntax used in /usr/bin/pyclean
is
not valid anymore. Restoring the original link of /usr/bin/python
to /usr/bin/python2
solved
the problem. Now the scripts could be run without any issues.
the link: StackOverflow
依照这想法,我顺利攻克了这个问题。
我的系统是ubuntu 14.04,安装了python2.7
看到这里后,安装了python3,并按顺序运行下面命令
# 改动python为python2
rm /usr/bin/python
ln -s /usr/bin/python2 /usr/bin/python
# 删除python-configparser。再通过aptitude来安装
sudo apt-get purge --auto-remove python-configparser
sudo aptitude install python-configparser
以上是关于ImportError: No module named 'ConfigParser'的主要内容,如果未能解决你的问题,请参考以下文章
ImportError : No module named graphics
python27 ImportError: No module named site
Python中ImportError: No module named request
ImportError: No module named win32api