“except (IOError, OSError), e: SyntaxError: invalid syntax”
2016-12-13 09:33
1981 查看
之前手动将Ubuntu16.04默认的Python2.7 改成了Python3 ,结果卸载软件的时候出错,
解决方案:在http://askubuntu.com/questions/240256/python-problem-report-python-apport-apport-break-apt-get 中找到的,可以用了
I had the same problem. A cleaner solution is to use:
在终端输入以下命令:
sudo update-alternatives –config python
There are 3 choices for the alternative python (providing /usr/bin/python).
1 /usr/bin/python2.6 20 manual mode
2 /usr/bin/python2.7 10 manual mode
3 /usr/bin/python3 30 manual mode
Press enter to keep the current choice[*], or type selection number: 2
也就是重新将Python设置成2.7版本的,
然后再次使用如下命令:
sudo apt-get remove –purge bleachbit
可以彻底删除bleachbit 了;
解决方案:在http://askubuntu.com/questions/240256/python-problem-report-python-apport-apport-break-apt-get 中找到的,可以用了
I had the same problem. A cleaner solution is to use:
在终端输入以下命令:
sudo update-alternatives –config python
There are 3 choices for the alternative python (providing /usr/bin/python).
Selection Path Priority Status
0 /usr/bin/python3 30 auto mode1 /usr/bin/python2.6 20 manual mode
2 /usr/bin/python2.7 10 manual mode
3 /usr/bin/python3 30 manual mode
Press enter to keep the current choice[*], or type selection number: 2
也就是重新将Python设置成2.7版本的,
然后再次使用如下命令:
sudo apt-get remove –purge bleachbit
可以彻底删除bleachbit 了;
相关文章推荐
- 【Linux】python 2.x 升级 python3.x 之后 yum命令出现except OSError, e: ^ SyntaxError: invalid syntax
- yum install 提示 except OSError, e: ^ SyntaxError: invalid syntax
- yum 安装软件是出现 except OSError, e: ^ SyntaxError: invalid syntax
- Centos中Python升级为3.X时yum出现except OSError, e: ^ SyntaxError: invalid syntax问题
- Centos中Python升级为3.X时yum出现except OSError, e: ^ SyntaxError: invalid syntax问题
- 使用yum命令报错File "/usr/bin/yum", line 30 except KeyboardInterrupt, e: SyntaxError: invalid syntax问题
- IndentationError: unexpected indent,SyntaxError: invalid syntax,TypeError: object() takes no paramet
- jquery $.ajax SyntaxError: invalid label /Uncaught SyntaxError: Unexpected token :
- oracle 12c 无法使用 os 认证登录数据库 ERROR: ORA-01017: invalid username/password; logon denied
- Python程序提示SyntaxError: invalid syntax错误
- Python程序提示SyntaxError: invalid syntax错误
- 编程遇到 R.java 里出现Syntax error on token 222,invalid variabledeclaratorid
- mac OS X El Capitan xcrun: error: invalid active developer path missing xcrun at
- json格式字符串用jquery.parseJSON()出现的问题 Uncaught SyntaxError: Unexpected token ' Uncaught SyntaxError: Une
- print SyntaxError: invalid syntax错误的问题
- 关于Python 3.x中,使用print函数时出现的语法错误(SyntaxError: invalid syntax)的问题的原因
- python中使用from..import时,提示SyntaxError:invalid syntax
- print SyntaxError: invalid syntax错误的问题
- eclipse 中 Syntax error on token "Invalid Character", delete this token 的解决
- 严重: Error in dependencyCheck java.io.IOException: invalid header field(tomcat启动成功但是访问web项目404错误)