This post explains how I recovered using the standard pylab install in ubuntu after I initially tried to use the Enthought Python Distribution, and broke some packages.
I try to install EPD
I tried to install the Enthought Python Distribution on Ubuntu (12.04), having had some success with it on windows (and not realising that Ubuntu had the constituent parts anyway). It moaned about matplotlib needing wxpython => version 2.8 and I couldn’t figure out how to get that to work.
I break the original pylab packages
In the process of trying to get EPD to work I realised that it might be easier to just use the packages already available to Ubuntu (numpy, scipy, ipython etc). Unfortunately my installing EPD had somehow messed up the ipython config file so it could no longer run with needed “ipython -pylab” to put it into pylab mode. It can’t load some module ‘kernmagic’, whatever that is.
I find a fix
I found this exchange which explained the issue and more or less how to sort it out. As a novice it took me a little while to figure out that the ipython_config.py file was in a hidden folder .ipython in my home directory (~/.ipython/profile_default). I then just followed the advice in the link of commenting out the line c.TerminalIPythonApp.extensions = [‘kernmagic’] in the config file. Sorted.