When I run a wrong command on my Ubuntu terminal, instead of echo-ing "command not found", the terminal does nothing, and when I press Ctrl+C it is echo-ing some python exception stack trace. Is something wrong? How can I fix this?
For example, when I enter "sdf", it does nothing. "sdf" is not a valid command.
But when I press Ctrl+C, it prints this python exception stack trace.
The stack trace is different every time.
I am using Ubuntu 14.04, so python2 is the default
$ type python python2 python3
python is /usr/bin/python
python2 is /usr/bin/python2
python3 is hashed (/usr/bin/python3)
$ readlink /usr/bin/python /usr/bin/python2 /usr/bin/python3
python2.7
python2.7
python3.4
$ python --version
Python 2.7.6
$ python3 --version
Python 2.7.6
$ readlink /usr/bin/python3.4
$
sudo apt-get install --reinstall python
did not help.sudo apt-get install --reinstall python3
threw an error
Update:
So after trying a lot of approaches, I ended up reinstalling Ubuntu. Follow wjandrea's answer and the comments, seem to be on point in identifying the problem.
python2 -c 'import usercustomize; print usercustomize.__file__'
– Florian Diesch Nov 23 '17 at 19:24sudo apt-get remove gnome-terminal && sudo apt-get install gnome-terminal
– himanshuxd Nov 24 '17 at 08:58