Check whether you have your own cmd.py
. That prevent import of standard library cmd
module.
Try following command:
python -c "import cmd; print(cmd.__file__)"
It should print something like:
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/cmd.py
or
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/cmd.pyc
If there's your own version of cmd.py
or cmd.pyc
, rename it.