Forums

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?

Thanks

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/ipapp.py", line 388, in launch_new_instance
app.initialize()
File "<string>", line 2, in initialize
File "/usr/local/lib/python2.7/site-packages/IPython/config/application.py", line 84, in catch_config_error
return method(app, args, kwargs)
File "/usr/local/lib/python2.7/site-packages/IPython/frontend/terminal/ipapp.py", line 324, in initialize
self.init_shell()
File "/usr/local/lib/python2.7/site-packages/IPython/frontend/terminal/ipapp.py", line 340, in init_shell
ipython_dir=self.ipython_dir)
File "/usr/local/lib/python2.7/site-packages/IPython/config/configurable.py", line 318, in instance
inst = cls(
args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/IPython/frontend/terminal/interactiveshell.py", line 360, in init
user_module=user_module, custom_exceptions=custom_exceptions
File "/usr/local/lib/python2.7/site-packages/IPython/core/interactiveshell.py", line 476, in init
self.init_reload_doctest()
File "/usr/local/lib/python2.7/site-packages/IPython/core/interactiveshell.py", line 666, in init_reload_doctest
doctest_reload()
File "/usr/local/lib/python2.7/site-packages/IPython/utils/doctestreload.py", line 72, in doctest_reload
import doctest
File "/usr/local/lib/python2.7/doctest.py", 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.