2

Folks,

I've recently updated my Ubuntu to the 13.10 version. To my surprise, Ipython and Matplotlib are available only in versions prior to those I had in my previous 12.04 LTS install.

When with the 12.04, I had the Julian Taylor PPA set up in my repositories, and that's why (I think) I had most up-to-date versions from both packages.

The versions currently in 13.10 are:

Matplotlib: 1.2.1 (http://matplotlib.org/index.html, most current version is 1.3.1)

Ipython: 0.13.2 (http://ipython.org, most current version is 1.1.0 – September 2013)

Is there any PPA available for the 13.10? The JTaylor ppa covers only as far as 12.10 (Quantal, link not available due to reputation rank in stack exchange)

Should I install those packages outside apt? Isn't that troublesome?

Thank you.

LuizAngioletti
  • 285
  • 2
  • 11
  • I usually prefer to install Python packages through Python package manager. It is pretty much the only way if you are planning to use multiple Python versions or virtual environments, and the package versions are guaranteed to be most recent. In Linux it is not troublesome at all. – fjarri Oct 27 '13 at 01:12
  • Is "python package manager" = pip? – LuizAngioletti Oct 27 '13 at 03:16
  • I've tried `sudo pip install ipython`. It installs without problems, but throws exceptions on calling as `ipython notebook --pylab inline`. I noticed that I could install numpy and matplotlib via the same channel, but it didn't came through. Numpy complained about a lot of dependencies, as did matplotlib (although in minor scale). Do I have to install any development packages or headers libraries to install anything successfully via pip? – LuizAngioletti Oct 27 '13 at 03:36
  • 3
    Yes, you have to install all the packages through ``pip``, and numpy and matplotlib require some external headers/libraries to be installed (because ``pip`` compiles their C part). See the list for [numpy](http://docs.scipy.org/doc/numpy/user/install.html#prerequisites) and [matplotlib](http://matplotlib.org/users/installing.html#build-requirements), there's not really a lot of them. – fjarri Oct 27 '13 at 06:48
  • I did it successfully. Should I post it here or in an answer by itself? – LuizAngioletti Oct 28 '13 at 00:37

3 Answers3

6

The way to fix it is using pip, as mentioned by @Bogdan.

The way to set up pip is described here: http://docs.python-guide.org/en/latest/starting/install/linux/#install-linux and it sums up to:

(I think python-distribute comes pre-installed in 13.10, but it doesn't hurt to check)

sudo apt-get install python-distribute

Then we set up the python environment properly:

sudo easy_install pip
sudo pip install virtualenv

After that, do:

sudo pip install ipython[all]

This will let pip take care of the dependencies listed by ipython. At this point, IPython is already working properly.

OPTIONAL, installing matplotlib and numpy:

These take care of the dependencies for matplotlib and numpy (and assuming you already have LaTeX properly installed):

apt-get install libfreetype6-dev libpng-dev libpython-all-dev gcc gfortran dvipdf

partial ref: Error while installing matplotlib

I'm aiming for something like this:

    ============================================================================
Edit setup.cfg to change the build options

BUILDING MATPLOTLIB
            matplotlib: yes [1.3.1]
                python: yes [2.7.5+ (default, Sep 19 2013, 13:49:51)  [GCC
                        4.8.1]]
              platform: yes [linux2]

REQUIRED DEPENDENCIES AND EXTENSIONS
                 numpy: yes [version 1.7.1]
              dateutil: yes [using dateutil version 2.1]
               tornado: yes [using tornado version 3.1.1]
             pyparsing: yes [using pyparsing version 2.0.1]
                 pycxx: yes [Couldn't import.  Using local copy.]
                libagg: yes [pkg-config information for 'libagg' could not
                        be found. Using local copy.]
              freetype: yes [version 16.1.10]
                   png: yes [version 1.2.49]

OPTIONAL SUBPACKAGES
           sample_data: yes [installing]
              toolkits: yes [installing]
                 tests: yes [using nose version 1.3.0]

    OPTIONAL BACKEND EXTENSIONS
                macosx: no  [Mac OS-X only]
                qt4agg: yes [installing, Qt: 4.8.4, PyQt4: 4.10.3]
               gtk3agg: yes [installing, version 3.4.8]
             gtk3cairo: yes [installing, version 3.4.8]
                gtkagg: no  [The C/C++ header for gtk (gtk/gtk.h) could not
                        be found.  You may need to install the development
                        package.]
                 tkagg: no  [The C/C++ header for Tk (tk.h) could not be
                        found.  You may need to install the development
                        package.]
                 wxagg: no  [requires wxPython]
                   gtk: no  [The C/C++ header for gtk (gtk/gtk.h) could not
                        be found.  You may need to install the development
                        package.]
                   agg: yes [installing]
                 cairo: yes [installing, version 1.8.8]
             windowing: no  [Microsoft Windows only]

OPTIONAL LATEX DEPENDENCIES
                dvipng: yes [version 1.14]
           ghostscript: yes [version 9.10]
                 latex: yes [version 3.1415926]
               pdftops: yes [version 0.24.1]

So, if I just missed any dependencies, just comment below ;)

Then, using pip:

sudo pip install matplotlib[all]

It compiles and done. Ipython, numpy and matplotlib ready for science in Ubuntu 13.10.

Community
  • 1
  • 1
LuizAngioletti
  • 285
  • 2
  • 11
  • This applies to 12.04 too. If for some reason you bump into an error of `ImportError: Entry point ('console_scripts', 'easy_install') not found` when trying to use `easy_install` to install `pip` simply use this guy's [recomendation](http://stackoverflow.com/questions/17614090/reviewboard-installation-on-ubuntu-12-04). It worked peachy here. – LuizAngioletti Oct 29 '13 at 23:29
1

There are ipython 1.1 debs available at this ppa: https://launchpad.net/~jtaylor/+archive/ipython

mpe
  • 2,480
  • 1
  • 18
  • 17
-1

Wait everyone, there is a much easier way. You should be able to load everything, Ipython, Matplotlib, Scipy, etc., through Continuum.io's Anaconda installation. Just download the free version and save yourself the trouble of trying to load all of this stuff manually.

Here is the link. https://store.continuum.io/cshop/anaconda/

krishnab
  • 7,198
  • 9
  • 45
  • 102
  • Under Windows, this would be the accepted answer. **This is Linux, however.** Anaconda only gets in the way of productive Linux work, which hardly benefits from _yet another_ One True Package Manager to Rule Them All. Windows all but requires Anaconda because of its lack of built-in support for compiling open-source UNIX packages. Compiling the same on Linux is trivial with sufficient package manager support – in this case, some combination of Debian's `apt-get` and/or Python's `pip`. – Cecil Curry Feb 13 '16 at 18:53
  • Actually, I don't agree with your comment @CecilCurry. I run pure linux and only use Anaconda to install python. In my personal experience trying to compile `numpy` and `matplotlib` and other core libraries using `apt-get` or `pip` does not work and leads to impossible to debug error messages. So if `apt-get` or `pip` cannot do the job, then only `Anaconda` is left. – krishnab Feb 16 '16 at 08:17