首页 > 其他 > 详细

ImportError: No module named 'ConfigParser'

时间:2017-07-24 16:01:15      阅读:388      评论:0      收藏:0      [点我收藏+]

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'

原文:http://www.cnblogs.com/liguangsunls/p/7229141.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!