Documentation

Hi,

The documention on building matplotlib from source (
http://matplotlib.sourceforge.net/users/installing.html )
says the following :

"If you are on debian/ubuntu, you can get all the dependencies
required to build matplotlib with:
sudo apt-get build-dep python-matplotlib"

However, doing so will force use to install over 800Mo of useless packages.
The dependencies mentioned after that (pytvhon,numpy, libpng,
freetype) are sufficient for building from source.
Could you edit that ?

Thanks

···

--
Alexis Praga

Actually, you will still need "python-dev" for compiling.

Sorry.

···

On Tue, May 1, 2012 at 5:21 PM, Alexis Praga <alexis.praga@...185...> wrote:

Hi,

The documention on building matplotlib from source (
http://matplotlib.sourceforge.net/users/installing.html )
says the following :

"If you are on debian/ubuntu, you can get all the dependencies
required to build matplotlib with:
sudo apt-get build-dep python-matplotlib"

However, doing so will force use to install over 800Mo of useless packages.
The dependencies mentioned after that (pytvhon,numpy, libpng,
freetype) are sufficient for building from source.
Could you edit that ?

Thanks

--
Alexis Praga

Can you provide a list of all of the packages that "apt-get build-dep python-matplotlib" installs? I think there's more required than what you listed. For example, it installs a C++ compiler, which is required. We can't assume the user has anything already, which is why build-dep is so convenient.

Mike

···

On 05/01/2012 11:21 AM, Alexis Praga wrote:

Hi,

The documention on building matplotlib from source (
http://matplotlib.sourceforge.net/users/installing.html )
says the following :

"If you are on debian/ubuntu, you can get all the dependencies
required to build matplotlib with:
sudo apt-get build-dep python-matplotlib"

However, doing so will force use to install over 800Mo of useless packages.
The dependencies mentioned after that (pytvhon,numpy, libpng,
freetype) are sufficient for building from source.
Could you edit that ?

Thanks

--
Alexis Praga

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

Here is the result of "apt-get build-dep python-matplotlib" :

The following NEW packages will be installed:
  blt debhelper doc-base docbook-xsl docbook-xsl-doc-html dvipng
global graphviz html2text intltool-debian ipython javascript-common
libatk1.0-dev libcairo2-dev libcgraph5 libfreezethaw-perl
  libgtk2.0-dev libgvpr1 libjs-jquery libmail-sendmail-perl
libmldbm-perl libpango1.0-dev libphonon4 libpixman-1-dev
libqt4-assistant libqt4-help libqt4-scripttools libqt4-svg libqt4-test
libqt4-webkit
  libqt4-xmlpatterns libsys-hostname-long-perl libwxbase2.8-dbg
libwxgtk2.8-dbg libxcb-render-util0-dev libxcb-render0-dev
libxcomposite-dev libxcursor-dev libxdamage-dev libxfixes-dev
libxi-dev
  libxrandr-dev libxss-dev po-debconf preview-latex-style python-all
python-all-dbg python-all-dev python-apptools python-dateutil
python-dbg python-docutils python-enthoughtbase python-epydoc
  python-foolscap python-gobject-dev python-gtk2-dev python-gtk2-doc
python-jinja2 python-lxml python-numpy-dbg python-pygments
python-qt-dev python-qt4 python-qt4-dev python-roman python-setuptools
  python-sip python-sip-dev python-sphinx python-tk python-traits
python-twisted-names python-tz python-wxgtk2.8 python-wxgtk2.8-dbg
python-wxversion python2.5 python2.5-dbg python2.5-dev
  python2.5-minimal python2.6-dbg tcl8.5-dev texlive-fonts-recommended
texlive-fonts-recommended-doc texlive-latex-extra
texlive-latex-extra-doc texlive-pictures texlive-pictures-doc texpower
  texpower-manual tipa tk8.5-dev wwwconfig-common wx2.8-headers
x11proto-composite-dev x11proto-damage-dev x11proto-fixes-dev
x11proto-randr-dev x11proto-scrnsaver-dev
0 upgraded, 100 newly installed, 0 to remove and 2 not upgraded.
Need to get 298 MB/369 MB of archives.
After this operation, 818 MB of additional disk space will be used.

Now, with "apt-rdepends python-matplotlib | head -n 24", I can have
the "true" dependencies :
python-matplotlib
  Depends: libatk1.0-0 (>= 1.29.3)
  Depends: libc6 (>= 2.3.6-6~)
  Depends: libcairo2 (>= 1.2.4)
  Depends: libfontconfig1 (>= 2.8.0)
  Depends: libfreetype6 (>= 2.2.1)
  Depends: libgcc1 (>= 1:4.1.1)
  Depends: libglib2.0-0 (>= 2.16.0)
  Depends: libgtk2.0-0 (>= 2.8.0)
  Depends: libpango1.0-0 (>= 1.14.0)
  Depends: libpng12-0 (>= 1.2.13-4)
  Depends: libstdc++6 (>= 4.4.0)
  Depends: python (>= 2.5)
  Depends: python-cairo
  Depends: python-dateutil
  Depends: python-gobject
  Depends: python-matplotlib-data (>= 0.99.3-1)
  Depends: python-numpy (>= 1:1.3.0)
  Depends: python-pyparsing
  Depends: python-support (>= 0.90.0)
  Depends: python-tz
  Depends: tcl8.5 (>= 8.5.0)
  Depends: tk8.5 (>= 8.5.0)
  Depends: zlib1g (>= 1:1.1.4)

···

--

Alexis Praga

Interesting, ipython is not a dependency of mpl. This repo is packaging mpl incorrectly.

Ben Root

···

On Wednesday, May 2, 2012, Alexis Praga wrote:

Here is the result of “apt-get build-dep python-matplotlib” :

The following NEW packages will be installed:

blt debhelper doc-base docbook-xsl docbook-xsl-doc-html dvipng

global graphviz html2text intltool-debian ipython javascript-common

libatk1.0-dev libcairo2-dev libcgraph5 libfreezethaw-perl

libgtk2.0-dev libgvpr1 libjs-jquery libmail-sendmail-perl

libmldbm-perl libpango1.0-dev libphonon4 libpixman-1-dev

libqt4-assistant libqt4-help libqt4-scripttools libqt4-svg libqt4-test

libqt4-webkit

libqt4-xmlpatterns libsys-hostname-long-perl libwxbase2.8-dbg

libwxgtk2.8-dbg libxcb-render-util0-dev libxcb-render0-dev

libxcomposite-dev libxcursor-dev libxdamage-dev libxfixes-dev

libxi-dev

libxrandr-dev libxss-dev po-debconf preview-latex-style python-all

python-all-dbg python-all-dev python-apptools python-dateutil

python-dbg python-docutils python-enthoughtbase python-epydoc

python-foolscap python-gobject-dev python-gtk2-dev python-gtk2-doc

python-jinja2 python-lxml python-numpy-dbg python-pygments

python-qt-dev python-qt4 python-qt4-dev python-roman python-setuptools

python-sip python-sip-dev python-sphinx python-tk python-traits

python-twisted-names python-tz python-wxgtk2.8 python-wxgtk2.8-dbg

python-wxversion python2.5 python2.5-dbg python2.5-dev

python2.5-minimal python2.6-dbg tcl8.5-dev texlive-fonts-recommended

texlive-fonts-recommended-doc texlive-latex-extra

texlive-latex-extra-doc texlive-pictures texlive-pictures-doc texpower

texpower-manual tipa tk8.5-dev wwwconfig-common wx2.8-headers

x11proto-composite-dev x11proto-damage-dev x11proto-fixes-dev

x11proto-randr-dev x11proto-scrnsaver-dev

0 upgraded, 100 newly installed, 0 to remove and 2 not upgraded.

Need to get 298 MB/369 MB of archives.

After this operation, 818 MB of additional disk space will be used.

Now, with “apt-rdepends python-matplotlib | head -n 24”, I can have

the “true” dependencies :

python-matplotlib

Depends: libatk1.0-0 (>= 1.29.3)

Depends: libc6 (>= 2.3.6-6~)

Depends: libcairo2 (>= 1.2.4)

Depends: libfontconfig1 (>= 2.8.0)

Depends: libfreetype6 (>= 2.2.1)

Depends: libgcc1 (>= 1:4.1.1)

Depends: libglib2.0-0 (>= 2.16.0)

Depends: libgtk2.0-0 (>= 2.8.0)

Depends: libpango1.0-0 (>= 1.14.0)

Depends: libpng12-0 (>= 1.2.13-4)

Depends: libstdc++6 (>= 4.4.0)

Depends: python (>= 2.5)

Depends: python-cairo

Depends: python-dateutil

Depends: python-gobject

Depends: python-matplotlib-data (>= 0.99.3-1)

Depends: python-numpy (>= 1:1.3.0)

Depends: python-pyparsing

Depends: python-support (>= 0.90.0)

Depends: python-tz

Depends: tcl8.5 (>= 8.5.0)

Depends: tk8.5 (>= 8.5.0)

Depends: zlib1g (>= 1:1.1.4)

Alexis Praga

neither a dependancy in Freebsd ports

Path: /usr/ports/math/py-matplotlib
Info: A plotting library uses a syntax familiar to matlab users
Maint: mainland@...4078...
B-deps: atk-2.0.1 binutils-2.22_1 bitstream-vera-1.10_5 blas-3.4.0
cairo-1.10.2_3,1 compositeproto-0.4.2 cups-client-1.5.2_1
damageproto-1.2.1 encodings-1.0.4,1 expat-2.0.1_2 fixesproto-5.0
font-bh-ttf-1.0.3 font-misc-ethiopic-1.0.3 font-misc-meltho-1.0.3
font-util-1.2.0 fontconfig-2.8.0_2,1 freetype2-2.4.9_1 gamin-0.1.10_4
gcc-4.6.4.20120420 gdk-pixbuf-2.23.5_1 gettext-0.18.1.1
gio-fam-backend-2.28.8_1 glib-2.28.8_4 gmp-5.0.4
gobject-introspection-0.10.8_2 gtk-2.24.6 gtk-update-icon-cache-2.24.6
hicolor-icon-theme-0.12 inputproto-2.0.2 intltool-0.41.1
jasper-1.900.1_10 jbigkit-1.6 jpeg-8_3 kbproto-1.0.5 lapack-3.4.0_2
libICE-1.0.7,1 libSM-1.2.0,1 libX11-1.4.4,1 libXau-1.0.6
libXcomposite-0.4.3,1 libXcursor-1.1.12 libXdamage-1.1.3
libXdmcp-1.1.0 libXext-1.3.0_1,1 libXfixes-5.0 libXft-2.1.14
libXi-1.4.5,1 libXinerama-1.1.1,1 libXrandr-1.3.2 libXrender-0.9.6
libXt-1.1.1,1 libffi-3.0.9 libfontenc-1.1.0 libglade2-2.6.4_4
libiconv-1.14 libpthread-stubs-0.3_3 libxcb-1.7 libxml2-2.7.8_2
mkfontdir-1.0.6 mkfontscale-1.0.9 mpc-0.9 mpfr-3.1.0_2
p5-XML-Parser-2.41 pango-1.28.4 pcre-8.30_2 perl-5.12.4_4
pixman-0.24.2 pkg-config-0.25_1 png-1.4.11 py27-cairo-1.8.10
py27-dateutil-1.5 py27-gobject-2.28.6 py27-gtk-2.24.0 py27-nose-1.1.2
py27-numpy-1.6.1_1,1 py27-pytz-2012c py27-setuptools-0.6c11_3
py27-tkinter-2.7.3_3 python27-2.7.3 randrproto-1.3.2
renderproto-0.11.1 shared-mime-info-0.90 tcl-8.5.11 tcl-modules-8.5.11
tiff-4.0.1_1 tk-8.5.11 xcb-util-0.3.8,1 xcb-util-renderutil-0.3.8
xextproto-7.2.0 xineramaproto-1.2.1 xmlcatmgr-2.2
xorg-fonts-truetype-7.5.1 xproto-7.0.22
R-deps: atk-2.0.1 binutils-2.22_1 bitstream-vera-1.10_5 blas-3.4.0
cairo-1.10.2_3,1 compositeproto-0.4.2 cups-client-1.5.2_1
damageproto-1.2.1 encodings-1.0.4,1 expat-2.0.1_2 fixesproto-5.0
font-bh-ttf-1.0.3 font-misc-ethiopic-1.0.3 font-misc-meltho-1.0.3
font-util-1.2.0 fontconfig-2.8.0_2,1 freetype2-2.4.9_1 gamin-0.1.10_4
gcc-4.6.4.20120420 gdk-pixbuf-2.23.5_1 gettext-0.18.1.1
gio-fam-backend-2.28.8_1 glib-2.28.8_4 gmp-5.0.4
gobject-introspection-0.10.8_2 gtk-2.24.6 gtk-update-icon-cache-2.24.6
hicolor-icon-theme-0.12 inputproto-2.0.2 jasper-1.900.1_10 jbigkit-1.6
jpeg-8_3 kbproto-1.0.5 lapack-3.4.0_2 libICE-1.0.7,1 libSM-1.2.0,1
libX11-1.4.4,1 libXau-1.0.6 libXcomposite-0.4.3,1 libXcursor-1.1.12
libXdamage-1.1.3 libXdmcp-1.1.0 libXext-1.3.0_1,1 libXfixes-5.0
libXft-2.1.14 libXi-1.4.5,1 libXinerama-1.1.1,1 libXrandr-1.3.2
libXrender-0.9.6 libXt-1.1.1,1 libffi-3.0.9 libfontenc-1.1.0
libglade2-2.6.4_4 libiconv-1.14 libpthread-stubs-0.3_3 libxcb-1.7
libxml2-2.7.8_2 mkfontdir-1.0.6 mkfontscale-1.0.9 mpc-0.9 mpfr-3.1.0_2
pango-1.28.4 pcre-8.30_2 perl-5.12.4_4 pixman-0.24.2 pkg-config-0.25_1
png-1.4.11 py27-cairo-1.8.10 py27-dateutil-1.5 py27-gobject-2.28.6
py27-gtk-2.24.0 py27-nose-1.1.2 py27-numpy-1.6.1_1,1 py27-pytz-2012c
py27-setuptools-0.6c11_3 py27-tkinter-2.7.3_3 python27-2.7.3
randrproto-1.3.2 renderproto-0.11.1 shared-mime-info-0.90 tcl-8.5.11
tcl-modules-8.5.11 tiff-4.0.1_1 tk-8.5.11 xcb-util-0.3.8,1
xcb-util-renderutil-0.3.8 xextproto-7.2.0 xineramaproto-1.2.1
xmlcatmgr-2.2 xorg-fonts-truetype-7.5.1 xproto-7.0.22
WWW: http://matplotlib.sourceforge.net/

Yeah, it definitely seems like there’s a bit too much here. I think
some of these dependencies are obsolete, in that we used to build
extensions against gtk and wx in order to transfer image data to
those backends, but those are no longer needed with current versions
of those libraries.

I looked up the direct dependencies of the package (since I think

many on the list you provided are probably secondary dependencies.)
I have some comments below. Maybe Sandro Tosi, who I know has done
some Debian packaging of matplotlib in the past, has some thoughts.

debhelper (>= 7) - probably needed to build a debian package
dvipng - to build the documentation
graphviz - to build the documentation
ipython - **seems unnecessary**
libfreetype6-dev - legit
libgtk2.0-dev - **no longer necessary**
libpng-dev - legit
python-all-dbg (>= 2.4.4-6) - **not strictly necessary, but helpful for debugging**
python-all-dev (>= 2.3.5-7) - legit
python-configobj - **necessary only for a long abandoned experimental version of matplotlib**
python-dateutil - legit
python-epydoc - **obsolete**
python-gtk2-dev - **obsolete**
python-imaging - legit
python-numpy (>= 1:1.3.0) - legit
python-numpy-dbg (>= 1:1.3.0) - legit
python-pkg-resources - legit
python-qt4 - **not needed for build**
python-qt4-dev - **not needed for build**
python-qt-dev - **obsolete**
python-setuptools - legit
python-sphinx (>= 0.5.1) - to build the documentation
python-support (>= 1.0.0) - not sure what this is
python-tk (>= 2.5.2-1.1) - legit
python-traits (>= 2.0) - **not needed -- matplotlib doesn't use traits**
python-tz - legit
python-wxgtk2.8 - **not needed for build**
python-wxgtk2.8-dbg - **not needed for build**
tcl8.5-dev - legit
texlive-fonts-recommended - needed for PDF doc build
texlive-latex-extra - needed for PDF doc build
texlive-latex-recommended - needed for PDF doc build
tk8.5-dev - legit
zlib1g-dev - legit
Mike
···

http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/Matplotlib-users@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/matplotlib-users

Dear Michael,

Sorry for such a lengthy email, but I wanted to ask about dependencies
as well. I am trying to get python and py3k versions of matplotlib
working. In addition to this I am trying to do this with git/master
version. I can build Python2 version, but I could not do it with Python3.

Could you tell me which packages are indeed needed to build python
git/master? What are differences between Python2 and Python3
dependencies? I could later provide a patch for the git/master INSTALL
file.

So, the compile dependencies are as follows?
    media-libs/libpng # Needed?
    dev-python/imaging # Only for docs?
    dev-python/xlwt # What about this package?

Runtime dependencies?
    virtual/ttf-fonts # I guess theese are needed for selecting
    media-fonts/stix-fonts # different fonts, or is it the case that
    media-fonts/texcm-ttf # mpl uses LaTeX fonts already?
    dev-python/pyparsing # Necessary?
    cairo? ( dev-python/pycairo ) # What about pango?
    excel? ( dev-python/xlwt )
    latex? ( # Needed only for latex'ing
        virtual/latex-base
        app-text/ghostscript-gpl
        app-text/poppler[utils] # Needed?
        dev-texlive/texlive-fontsrecommended
    )"

I started to follow the development of MPL a bit and IIRC it is
now possible to install a python3 version along with the Python2. What
is more one can use Pyside instead of pyqt4 for qt. But what about gtk?
What libs are needed if I want to use gtk and python3? I remember, that
there were some issues, but do not know whether they were resolved.

Maybe it would be a good idea to reflect the Python3 status/dependencies
in the documentation?

Either way, thanks very much for working on the project!

All best,
Ignas A.

Dear Michael,

Sorry for such a lengthy email, but I wanted to ask about dependencies
as well. I am trying to get python and py3k versions of matplotlib
working. In addition to this I am trying to do this with git/master
version. I can build Python2 version, but I could not do it with Python3.

Could you tell me which packages are indeed needed to build python
git/master? What are differences between Python2 and Python3
dependencies? I could later provide a patch for the git/master INSTALL
file.

I'm not familiar with the package naming scheme used below. What OS is this on?

So, the compile dependencies are as follows?
     media-libs/libpng # Needed?

Yes.

     dev-python/imaging # Only for docs?

No longer needed by git master.

     dev-python/xlwt # What about this package?

Only needed if using the optional exceltools package.

Runtime dependencies?
     virtual/ttf-fonts # I guess theese are needed for selecting
     media-fonts/stix-fonts # different fonts, or is it the case that
     media-fonts/texcm-ttf # mpl uses LaTeX fonts already?

These are shipped in the matplotlib git repository, so aren't strictly necessary.

     dev-python/pyparsing # Necessary?

Likewise.

     cairo? ( dev-python/pycairo ) # What about pango?

This is required if you want to use the GtkCairo backend. Pango is a dependency of cairo, but not a direct dependency of matplotlib. If your platform does package dependency resolution, that should be taken care of automatically.

     excel? ( dev-python/xlwt )

See above.

     latex? ( # Needed only for latex'ing
         virtual/latex-base

Needed to build the docs or for "true" LaTeX font support (when the option text.usetex is True)

         app-text/ghostscript-gpl

Needed for testing.

         app-text/poppler[utils] # Needed?

Not needed.

         dev-texlive/texlive-fontsrecommended
     )"

Possibly needed, depending how things are packaged on your system.

In addition to above, you'll need the numpy development packages. Optionally, you'll want PyQt4 or PySide, wxPython, pygtk (pygobject on Python 3) or tkinter. But you only need one GUI framework of your preference. If using pygtk or tkinter, you'll also need to install the development headers.

I started to follow the development of MPL a bit and IIRC it is
now possible to install a python3 version along with the Python2. What
is more one can use Pyside instead of pyqt4 for qt. But what about gtk?
What libs are needed if I want to use gtk and python3? I remember, that
there were some issues, but do not know whether they were resolved.

The issues is that you can't use Gtk with Agg, only with Cairo under Python 3. I've put a mailing list message into the pygobject developers about adding the necessary functionality to make this work, but have received no response for months.

Maybe it would be a good idea to reflect the Python3 status/dependencies
in the documentation?

Yes -- those are probably static enough now to do that.

Either way, thanks very much for working on the project!

You're welcome.

Mike

···

On 05/03/2012 04:31 PM, Ignas Anikevicius wrote:

All best,
Ignas A.

Hello Michael,

ipython - **seems unnecessary**

removed

python-configobj - **necessary only for a long abandoned experimental
version of matplotlib**

removed

python-epydoc - **obsolete**

removed

python-qt4 - **not needed for build**

without it, there's several errors building the docs when rendering
the backend_qt4agg page, so I'll leave it

python-qt4-dev - **not needed for build**
python-qt-dev - **obsolete**

removed

python-traits (>= 2.0) - **not needed -- matplotlib doesn't use traits**

removed

python-wxgtk2.8 - **not needed for build**

same as for

python-wxgtk2.8-dbg - **not needed for build**

removed

Thanks for your review!

···

On Thu, May 3, 2012 at 1:25 PM, Michael Droettboom <mdroe@...86...> wrote:

--
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi