IPython console doesn't start

Hi guys, The IPython console version 2.7 doesn't start. Here is the stack trace. Have you already seen this issue?


Traceback (most recent call last): File "/usr/local/bin/ipython2.7", line 9, in <module>
load_entry_point('ipython==0.13.1', 'console_scripts', 'ipython')()
File "/usr/local/lib/python2.7/site-packages/IPython/frontend/terminal/", line 388, in launch_new_instance
File "<string>", line 2, in initialize
File "/usr/local/lib/python2.7/site-packages/IPython/config/", line 84, in catch_config_error
return method(app, args, kwargs)
File "/usr/local/lib/python2.7/site-packages/IPython/frontend/terminal/", line 324, in initialize
File "/usr/local/lib/python2.7/site-packages/IPython/frontend/terminal/", line 340, in init_shell
File "/usr/local/lib/python2.7/site-packages/IPython/config/", line 318, in instance
inst = cls(
args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/IPython/frontend/terminal/", line 360, in init
user_module=user_module, custom_exceptions=custom_exceptions
File "/usr/local/lib/python2.7/site-packages/IPython/core/", line 476, in init
File "/usr/local/lib/python2.7/site-packages/IPython/core/", line 666, in init_reload_doctest
File "/usr/local/lib/python2.7/site-packages/IPython/utils/", line 72, in doctest_reload
import doctest
File "/usr/local/lib/python2.7/", line 2153, in <module>
class DocTestCase(unittest.TestCase):
AttributeError: 'module' object has no attribute 'TestCase'

We haven't seen this before. Do you have any custom config or site packages or anything like that?

I've installed some additional modules using pip install --user. But, I don't have the list.

The same issue occurs with all iPython versions.

Is it possible that you installed a unittest replacement or something like that? Maybe a file or a folder called unittest in your home dir? It looks like there's an accidental replacement of unittest that's getting in the way.