[ELUG] matplotlib (actualizacion)

roberto@cnyn.unam.mx roberto at cnyn.unam.mx
Sat Jun 14 22:33:41 PDT 2008


Gracias Joel!!
   una maravilla este paquete. Lo instale y jala super bien. 
   Tratare de integrarlo a un trabajo que estoy haciendo, con el Pyraf, ya que
todo corre bajo Python. 
Saludos
Roberto


Mensaje citado por Joel Rodriguez <joel at versamedium.com>:

> Estimados AFE-UABC's, ELUG's, GLO's
> 
> A continuaci'on una guia para instalar Matplotlib 
> http://matplotlib.sourceforge.net/  <--(Que es matplotlib?)
> 
> es un paquete (tipo matlab) que sirve para 
> realizar graficas de alta calidad con linux, 
> 
> 
> ver capturas de pantalla (screenshots) en:
> http://matplotlib.sourceforge.net/screenshots.html
> 
> ver tutorial con graficas en 
> http://matplotlib.sourceforge.net/tutorial.html
> 
> 
> 
> Estoy utilizando Slackware 12.1 pero las 
> instrucciones son para cualquier distribucion
> 
> En las instrucciones a continuacion se considera
> que todos los paquetes fuente  estan en :
> 
> /usr/packages (si no existe el directorio crearlo )
> 
> cd /usr
> mkdir packages
> 
> cd packages
> 
> desde consola iniciar a instalar paqueteria necesaria:
> 
> # A) Instalar Python 2.5.2 (opcional si ya est'a instalado)
> 
> 
> -Es necesario tener instalado Python:
> wget -c http://www.python.org/ftp/python/2.5.2/Python-2.5.2.tar.bz2
> (9.8 MegaBytes)
> 
> (como root)
> cp Python-2.5.2.tar.bz2 /usr/packages
> cd /usr/packages
> tar -jxvf Python-2.5.2.tar.bz2
> cd Python-2.5.2
> ./configure
> make
> make install
> 
> si obtienes un error (como yo) al invocar make install?:
> proceder como sigue:
> 
> /***************************************************/
> 
> Compiling /usr/local/lib/python2.5/zipfile.py ...
> make: *** [libinstall] Error 1
> 
> make -i install
> 
> /***************************************************/
> ldconfig 
> ldconfig -v
> 
> python ser'a instalado en:
> /usr/local/lib/python2.5/
> 
> editar /etc/profile
> (el mio se ve as'i)
> 
> export PYTHONSTARTUP="/usr/local/lib/python2.5"
> export
> PYTHONPATH="/usr/local/bin/python2.5:/usr/local/lib/python2.5:/opt/wx/2.5
> :/usr/local/lib/python2.5/site-packages:/usr/local/lib/python2.5/site-packages/g
> tk-2.0"
> export PYTHONHOME="/usr/local"
> 
> 
> borrar algunas dependencias de alg'un python anterior, por ejemplo python
> 2.4
> rm /usr/bin/python2.4
> rm /usr/local/bin/python2.4
> 
> El siguiente paso es  apagar y encender la computadora
> o alternativamente invocar en una ventana de comandos
> `source /etc/profile' (como root)
> 
> para no reiniciar la maquina. 
> 
> desde esa misma ventana ahora invocamos python i.e.:
> root at pc-joel:/usr# python
> Python 2.5.2 (r252:60911, Jun 11 2008, 15:36:42) 
> [GCC 3.3.6] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>>
> 
> 
> 
> # B) Instalar GLIB (opcional si ya est'a instalado, o falla mas adelante,
> cuando se compila)
> 
> wget -c ftp://ftp.gtk.org/pub/glib/2.15/glib-2.15.4.tar.bz2
> (4.2 megabytes)
> 
> 
> tar -jxvf glib-2.15.4.tar.bz2
> cd glib-2.15.4  
> ./configure 
> make 
> make install
> ldconfig
> cd ..
> 
> 
> # C) Instalar atk
> 
> http://ftp.gnome.org/pub/gnome/sources/atk/1.22/atk-1.22.0.tar.gz
> <http://www.icewalkers.com/download/ATK/1433/dls/>
> (954 KiloBytes)
> 
> tar -jxvf atk-1.22.0.tar.gz
> cd atk-1.22.0
> ./configure --prefix=/usr 
> make 
> make install
> ldconfig
> cd ..
> 
> 
> # D) Instalar pixman
> 
> 
> wget -c http://cairographics.org/releases/pixman-0.11.4.tar.gz
> (436 KiloBytes)
> 
> 
> tar -zxvf  pixman-0.11.4.tar.gz
> cd  pixman-0.11.4
> ./configure --prefix=/usr
> make
> make install
> ldconfig
> cd ..
> 
> 
> 
> 
> # E) Instalar cairo
> 
> de Cairo graphics ``bajar''
> http://cairographics.org/releases/
> 
> wget -c http://cairographics.org/releases/cairo-1.6.4.tar.gz
> (5 MegaBytes)
> 
> tar -zxvf  cairo-1.6.4.tar.gz
> cd  cairo-1.6.4
> ./configure --prefix=/usr
> make
> make install
> ldconfig
> cd ..
> 
> 
> 
> # F) Instalar pango
> 
> wget -c
> http://ftp.acc.umu.se/pub/gnome/sources/pango/1.21/pango-1.21.2.tar.bz2
> (1.4 MegaBytes)
> 
> tar -jxvf pango-1.21.2.tar.bz2
> cd pango-1.21.2
> 
> ./configure prefix=/usr
> make
> make install
> ldconfig
> cd ..
> 
> # G) Instalar gtk+  (opcional si ya est'a instalado, o falla mas adelante,
> cuando se compila)
> 
> wget -c ftp://ftp.gtk.org/pub/gtk/2.12/gtk+-2.12.6.tar.bz2
> (31.3 MegaBytes)
> 
> 
> tar -jxvf gtk+-2.12.6.tar.bz2
> cd  gtk+-2.12.6
> ./configure prefix=/usr
> make
> make install
> ldconfig
> cd ..
> 
> 
> 
> # H) Instalar NumPy:
> 
> de
> 
> http://numpy.scipy.org/
> 
> bajar
> 
> numpy-1.1.0.tar.gz
>
<http://downloads.sourceforge.net/numpy/numpy-1.1.0.tar.gz?modtime=1211963809&big_mirror=0>
		
> 
> (1.7 MegaBytes)
> 
> 
> tar -zxvf numpy-1.1.0.tar.gz
> cd numpy-1.1.0
> python setup.py config
> 
> ..despues de algunos ``warnings''
> 
> python setup.py build
> python setup.py install
> ldconfig
> cd ..
> 
> 
> # I) Instalar libglade
> 
> 
> wget -c
> http://ftp.acc.umu.se/pub/gnome/sources/libglade/2.6/libglade-2.6.2.tar.bz2
> (344 KiloBytes)
> 
> 
> tar -jxvf  libglade-2.6.2.tar.bz2
> cd libglade-2.6.2
> ./configure --prefix=/usr
> make
> make install
> ldconfig
> cd ..
> 
> 
> # J) Instalar PyObject
> 
> wget -c
> http://ftp.acc.umu.se/pub/gnome/sources/pygobject/2.14/pygobject-2.14.2.tar.bz2
> (358 KiloBytes)
> 
> 
> tar -jxvf pygobject-2.14.2.tar.bz2
> cd pygobject-2.14.2
> ./configure --prefix=/usr
> make
> make install
> ldconfig
> cd ..
> 
> 
> # K) Instalar PyGTK
> bajar de:
> wget -c
> http://ftp.acc.umu.se/pub/gnome/sources/pygtk/2.12/pygtk-2.12.1.tar.bz2
> (2.1 MegaBytes)
> 
> tar -jxvf pygtk-2.12.1.tar.bz2
> cd pygtk-2.12.1
> ./configure --prefix=/usr
> make
> make install
> ldconfig
> cd ..
> 
> 
> # L) Instalar Pycairo
> 
> wget -c http://cairographics.org/releases/pycairo-1.4.12.tar.gz
> (479 KiloBytes)
> 
> tar -zxvf pycairo-1.4.12.tar.gz
> cd pycairo-1.4.12
> ./configure --prefix=/usr
> make
> make install
> ldconfig
> cd ..
> 
> 
> # M) Instalar matplotlib
> http://sourceforge.net/projects/matplotlib
> en secci'on (Download Matplotlib)
> 
> matplotlib-0.98.0.tar.gz
>
<http://sourceforge.net/project/showfiles.php?group_id=80706&package_id=278194&release_id=603020>
> (4 MegaBytes)
> 
> tar -zxvf matplotlib-0.98.0.tar.gz
> cd  matplotlib-0.98.0
> 
> python setup.py config
> python setup.py build
> python setup.py install
> ldconfig
> cd ..
> 
> 
> # N) Instalar basemap
> 
> http://sourceforge.net/projects/matplotlib
> 
> basemap-0.99.tar.gz
>
<http://sourceforge.net/project/showfiles.php?group_id=80706&package_id=142792&release_id=603594>
> (103 MegaBytes)
> 
> basemap-0.99-examples.tar.gz
>
<http://sourceforge.net/project/showfiles.php?group_id=80706&package_id=142792&release_id=603594>
> (9 MegaBytes)
> 
> 
> tar -zxvf basemap-0.99.tar.gz
> tar -zxvf basemap-0.99-examples.tar.gz
> 
> cd basemap-0.99
> 
> #primero necesitamos las libs de geos
> cd geos-2.2.3
> ./configure
> make 
> make install
> ldconfig
> cd ..
> 
> #regresamos a la instalaci'on normal
> python setup.py config
> python setup.py build
> python setup.py install
> ldconfig
> cd examples
> python run_all.py
> 
> 
> LISTO!
> 
> para probarlo (``mas sencillo'')
> 
> hacer un archivo (que se llame prueba.py) que contenga:
> 
> #!/usr/bin/env python
> from pylab import *
> plot([1,2,3,4])
> show()
> 
> 
> para correrlo?:
> 
> dar permisos de ejecucion al archivo
> chmod 777 ./prueba.py
> ./prueba.py
> 
> obtenemos bonita grafica,
> 
> ver:
> http://matplotlib.sourceforge.net/tutorial.html
> 
> reciban cordiales saludos,
> :/)
> /
> Joel Rodriguez
> joel at versamedium.com
> 
> 
> _______________________________________________
> Lista mailing list
> Lista at elug.ciberlinux.net
> http://elug.ciberlinux.net/mailman/listinfo/lista
> 
> 




More information about the Lista mailing list