|
From: Lionel R. <lro...@li...> - 2007-12-03 14:03:36
|
Hi all,
there's a little problem with ghostscript on ubuntu gutsy, mpl complaints=20
about a bad version :
ipython -pylab
/usr/lib/python2.5/site-packages/matplotlib/__init__.py:641: UserWarning:=20
matplotlibrc ps.usedistiller option can not be used unless ghostscript-7.07=
=20
or later is installed on your system
but gs -v returns:
GPL Ghostscript SVN PRE-RELEASE 8.61 (2007-08-02)
Copyright (C) 2007 Artifex Software, Inc. All rights reserved.
Here is the modified __init__.py to deal with it :
################
def checkdep_ghostscript():
try:
if sys.platform =3D=3D 'win32':
command =3D 'gswin32c -v'
else:
command =3D 'gs --version'
stdin, stdout =3D os.popen4(command)
line =3D stdout.readlines()[0]
v =3D line.strip()
vtest =3D '.'.join(v.split('.')[:2]) # deal with version numbers=20
like '7.07.1'
float(vtest)
return vtest
################
matplotlib.__version__
Out [10]:'0.90.1'
=2D-=20
Lionel Roubeyrie - lro...@li...
Charg=C3=A9 d'=C3=A9tudes et de maintenance
LIMAIR - la Surveillance de l'Air en Limousin
http://www.limair.asso.fr
|