I am running python3.2 on Ubuntu 10.10 i386 (32 bit).
I just installed matplotlib-py3 (from source) for learning purposes and when I try one of the many examples on the website:
##!/usr/local/bin/python3.2
#-*- coding:utf-8 -*-
import numpy as np
import matplotlib.pyplot as plt
# evenly sampled time at 200ms intervals
t = np.arange(0., 5., 0.2)
# red dashes, blue squares and green triangles
plt.plot(t, t, 'r--', t, t**2, 'bs', t, t**3, 'g^')
In the terminal I get a lot of errors when it's importing matplotlib:
File "test.py", line 6, in <module>
import matplotlib.pyplot as plt
File "/usr/local/lib/python3.2/site-packages/matplotlib/pyplot.py", line 24, in <module>
from matplotlib.figure import Figure, figaspect
File "/usr/local/lib/python3.2/site-packages/matplotlib/figure.py", line 19, in <module>
from .axes import Axes, SubplotBase, subplot_class_factory
File "/usr/local/lib/python3.2/site-packages/matplotlib/axes.py", line 16, in <module>
import matplotlib.axis as maxis
File "/usr/local/lib/python3.2/site-packages/matplotlib/axis.py", line 14, in <module>
import matplotlib.text as mtext
File "/usr/local/lib/python3.2/site-packages/matplotlib/text.py", line 29, in <module>
from matplotlib.backend_bases import RendererBase
File "/usr/local/lib/python3.2/site-packages/matplotlib/backend_bases.py", line 47, in <module>
import matplotlib.textpath as textpath
File "/usr/local/lib/python3.2/site-packages/matplotlib/textpath.py", line 11, in <module>
from matplotlib.mathtext import MathTextParser
File "/usr/local/lib/python3.2/site-packages/matplotlib/mathtext.py", line 60, in <module>
import matplotlib._png as _png
ImportError: libpng15.so.15: cannot open shared object file: No such file or directory
I tried with a couple of examples from the website and they all give the same errors. When I import matplotlib by itself in the interactive python shell everything works fine, it's only when I import things like import matplotlib.pyplot as plt that I see all these errors.
Don't know if I installed it the wrong way or if I'm doing something wrong, but that's why I'm posting here.
Thanks.