import matplotlib._png ausfällt
Habe ich ein problem bekommen matplotlib 1.0.0
arbeiten in Python 2.5.2
(Ubuntu 10.04
)
Siehe die beigefügten Ausgabe in der Konsole. Irgendwelche Ideen geschätzt. Dank
Python 2.5.2 (r252:60911, Jul 23 2010, 23:04:44)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> import scipy
>>> import matplotlib
>>> print matplotlib.__version__
1.0.0
>>> print numpy.__version__
1.4.1
>>> print scipy.__version__
0.8.0rc3
>>> from pylab import *
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.5/site-packages/pylab.py", line 1, in <module>
from matplotlib.pylab import *
File "/usr/local/lib/python2.5/site-packages/matplotlib/pylab.py", line 216, in <module>
from matplotlib import mpl # pulls in most modules
File "/usr/local/lib/python2.5/site-packages/matplotlib/mpl.py", line 2, in <module>
from matplotlib import axis
File "/usr/local/lib/python2.5/site-packages/matplotlib/axis.py", line 14, in <module>
import matplotlib.text as mtext
File "/usr/local/lib/python2.5/site-packages/matplotlib/text.py", line 31, in <module>
from matplotlib.backend_bases import RendererBase
File "/usr/local/lib/python2.5/site-packages/matplotlib/backend_bases.py", line 41, in <module>
import matplotlib.textpath as textpath
File "/usr/local/lib/python2.5/site-packages/matplotlib/textpath.py", line 9, in <module>
from matplotlib.mathtext import MathTextParser
File "/usr/local/lib/python2.5/site-packages/matplotlib/mathtext.py", line 52, in <module>
import matplotlib._png as _png
ImportError: libpng14.so.14: cannot open shared object file: No such file or directory
>>>
Juli 27,01:05
Eine Neuerstellung von matlibplot gibt:
sudo python setup.py build
basedirlist is: ['/usr/local', '/usr']
============================================================================
BUILDING MATPLOTLIB
matplotlib: 1.0.0
python: 2.5.2 (r252:60911, Jul 23 2010, 23:04:44) [GCC
4.4.3]
platform: linux2
REQUIRED DEPENDENCIES
numpy: 1.4.1
freetype2: 11.1.5
OPTIONAL BACKEND DEPENDENCIES
libpng: 1.4.3
Tkinter: no
* TKAgg requires Tkinter
wxPython: no
* wxPython not found
Gtk+: no
* Building for Gtk+ requires pygtk; you must be able
* to "import gtk" in your build/install environment
Mac OS X native: no
Qt: no
Qt4: no
Cairo: no
OPTIONAL DATE/TIMEZONE DEPENDENCIES
datetime: present, version unknown
dateutil: 1.5
pytz: 2010h
OPTIONAL USETEX DEPENDENCIES
dvipng: no
ghostscript: 8.71
latex: no
pdftops: 0.12.4
[Edit setup.cfg to suppress the above messages]
============================================================================
pymods ['pylab']
packages ['matplotlib', 'matplotlib.backends', 'matplotlib.backends.qt4_editor', 'matplotlib.projections', 'matplotlib.testing', 'matplotlib.testing.jpl_units', 'matplotlib.tests', 'mpl_toolkits', 'mpl_toolkits.mplot3d', 'mpl_toolkits.axes_grid', 'mpl_toolkits.axes_grid1', 'mpl_toolkits.axisartist', 'matplotlib.sphinxext', 'matplotlib.numerix', 'matplotlib.numerix.mlab', 'matplotlib.numerix.ma', 'matplotlib.numerix.linear_algebra', 'matplotlib.numerix.random_array', 'matplotlib.numerix.fft', 'matplotlib.tri', 'matplotlib.delaunay']
running build
running build_py
copying lib/matplotlib/mpl-data/matplotlibrc -> build/lib.linux-i686-2.5/matplotlib/mpl-data
copying lib/matplotlib/mpl-data/matplotlib.conf -> build/lib.linux-i686-2.5/matplotlib/mpl-data
running build_ext
sudo python setup.py install
basedirlist is: ['/usr/local', '/usr']
============================================================================
BUILDING MATPLOTLIB
matplotlib: 1.0.0
python: 2.5.2 (r252:60911, Jul 23 2010, 23:04:44) [GCC
4.4.3]
platform: linux2
REQUIRED DEPENDENCIES
numpy: 1.4.1
freetype2: 11.1.5
OPTIONAL BACKEND DEPENDENCIES
libpng: 1.4.3
Tkinter: no
* TKAgg requires Tkinter
wxPython: no
* wxPython not found
Gtk+: no
* Building for Gtk+ requires pygtk; you must be able
* to "import gtk" in your build/install environment
Mac OS X native: no
Qt: no
Qt4: no
Cairo: no
OPTIONAL DATE/TIMEZONE DEPENDENCIES
datetime: present, version unknown
dateutil: 1.5
pytz: 2010h
OPTIONAL USETEX DEPENDENCIES
dvipng: no
ghostscript: 8.71
latex: no
pdftops: 0.12.4
[Edit setup.cfg to suppress the above messages]
============================================================================
pymods ['pylab']
packages ['matplotlib', 'matplotlib.backends', 'matplotlib.backends.qt4_editor', 'matplotlib.projections', 'matplotlib.testing', 'matplotlib.testing.jpl_units', 'matplotlib.tests', 'mpl_toolkits', 'mpl_toolkits.mplot3d', 'mpl_toolkits.axes_grid', 'mpl_toolkits.axes_grid1', 'mpl_toolkits.axisartist', 'matplotlib.sphinxext', 'matplotlib.numerix', 'matplotlib.numerix.mlab', 'matplotlib.numerix.ma', 'matplotlib.numerix.linear_algebra', 'matplotlib.numerix.random_array', 'matplotlib.numerix.fft', 'matplotlib.tri', 'matplotlib.delaunay']
running install
running build
running build_py
copying lib/matplotlib/mpl-data/matplotlibrc -> build/lib.linux-i686-2.5/matplotlib/mpl-data
copying lib/matplotlib/mpl-data/matplotlib.conf -> build/lib.linux-i686-2.5/matplotlib/mpl-data
running build_ext
running install_lib
copying build/lib.linux-i686-2.5/matplotlib/mpl-data/matplotlibrc -> /usr/local/lib/python2.5/site-packages/matplotlib/mpl-data
copying build/lib.linux-i686-2.5/matplotlib/mpl-data/matplotlib.conf -> /usr/local/lib/python2.5/site-packages/matplotlib/mpl-data
running install_egg_info
Removing /usr/local/lib/python2.5/site-packages/matplotlib-1.0.0-py2.5.egg-info
Writing /usr/local/lib/python2.5/site-packages/matplotlib-1.0.0-py2.5.egg-info
sudo apt-get install libpng14
- konnte Paket nicht finden libpng14
- Sie können immer die Suche nach der korrekten Paket-name:
apt-cache search libpng
Du musst angemeldet sein, um einen Kommentar abzugeben.
Sollten Sie Ihre LD_LIBRARY_PATH environnment variable und prüfen Sie, ob Ihre libpng ist.
Das gemeldete problem von python ist ein problem der dynamischen Belastung : Nichts zu sehen, mit der Neuübersetzung von matplotlib.
Also :
Finde den Standort von libpng.14.so mit :
$> locate libpng.14.so
Beachten Sie, dass die Datei muss den genauen Namen, so müssen Sie möglicherweise erstellen Sie einen symbolischen link, wenn zum Beispiel, Sie haben die libpng.14.so.0 oder sowas (in der Regel die symbolischen Verknüpfungen werden automatisch erstellt, wenn Sie installieren der lib
Wenn Sie haben noch keine libpng.14.so.etwas oder libpng.14.so müssen Sie möglicherweise neu installieren libpng 1.4 (mit Ihrem Paket-manager oder direkt aus den Quellen)
Check $LD_LIBRARY_PATH. Ändern Sie es, wenn Sie müssen mit :
$> export LD_LIBRARY_PATH=anewDir:$LD_LIBRARY_PATH
Installieren libpng. 14 ich glaube, dass bezieht sich auf die aktuelle version 1.4.
BEARBEITUNGEN
Ich würde rebuild-matplotlib aus der Quelle wieder. Wenn Sie ausführen:
achten Sie auf den Beginn der Ausgabe und stellen Sie sicher, dass es Bibliotheken findet, die es braucht. Zum Beispiel auf meiner box:
Ich hatte ein ähnliches problem mit py27-matplotlib von macports. Nach dem Versuch ein paar Dinge, die ich bemerkt hatte, dass ich eine alte version von _png.also von matplotlib 1.10 in meine Website-Pakete. Die so gelinkt gegen die libpng14 anstatt die neuere version habe ich installiert.
Nach dem entfernen der alten (unbenutzt!) _png.so, läuft
port uninstall/clean py27-matplotlib
und einen frischen build, den richtigen libpng verbunden war und ipython/pylab funktionierte wieder.easy_install
das problem gelöst.