From: Todd M. <jm...@st...> - 2004-04-21 20:35:19
|
Hi Gerry, I just noticed a similar "failure" when I try to run matplotlib from the root of the source tree, i.e. the directory matplotlib-0.53. I think doing that (running from the root) causes Python to interpret the matplotlib subdirectory (matplotlib-0.53/matplotlib) as a package and to look for ft2font.so there rather than in site-packages/matplotlib. Try cd'ing to some other directory. HTH, Todd On Wed, 2004-04-21 at 15:47, Gerry Wiener wrote: > I'm trying to run the first example in the tutorial but am running into > an import problem: > > ActivePython 2.3.2 Build 231 (ActiveState Corp.) based on > Python 2.3.2 (#1, Nov 6 2003, 09:47:20) > [GCC 2.96 20000731 (Red Hat Linux 7.3 2.96-113)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from matplotlib.matlab import * > Traceback (most recent call last): > File "<stdin>", line 1, in ? > File "matplotlib/matlab.py", line 128, in ? > from axes import Axes > File "matplotlib/axes.py", line 10, in ? > from axis import XTick, YTick, XAxis, YAxis > File "matplotlib/axis.py", line 22, in ? > from font_manager import FontProperties > File "matplotlib/font_manager.py", line 38, in ? > from matplotlib import ft2font > ImportError: cannot import name ft2font > > I've built and installed the freetype2 library and the matplotlib > installation cites: > > running install_lib > copying build/lib.linux-i686-2.3/matplotlib/backends/_tkagg.so -> > /d2/gerry/local/ActivePython-2.3/lib/python2.3/site-packages/matplotlib/backends > copying build/lib.linux-i686-2.3/matplotlib/backends/_backend_agg.so -> > /d2/gerry/local/ActivePython-2.3/lib/python2.3/site-packages/matplotlib/backends > copying build/lib.linux-i686-2.3/matplotlib/ft2font.so -> > /d2/gerry/local/ActivePython-2.3/lib/python2.3/site-packages/matplotlib > copying build/lib.linux-i686-2.3/matplotlib/_image.so -> > /d2/gerry/local/ActivePython-2.3/lib/python2.3/site-packages/matplotlib > > Not sure what's going wrong. Please respond to my email as well since > I'm not a subscriber to the email list. > > Thanks, > > Gerry Wiener > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Todd Miller <jm...@st...> |