matplotlib-0.82 and py2exe

Hi John, When creating a py2exe version of my app with the

    > 0.82 build it fails due to an import error on line 96 of
    > numerix.

    > I use numeric and .matplotlibrc is configured accordingly.

    > These __import__ were not present in 0.8, can they savely
    > be removed?

Yes, these are mainly used as a convenience, so that the subpackages
of the numerix module (random_array, mlab, linear_algebra, etc) are
available in the numerix namespace. This enables you to just do a
single import, but the matplotlib code itself does not rely on it if I
recall correctly.

import matplotlib.numerix as nx
nx.linear_algebra.inverse

JDH

Hi John,

Just FYI.

Instead of commenting these imports out I just tweaked my py2exe
setup.py file.

"packages": ["encodings", "kinterbasdb", "pytz", "matplotlib.numerix"],

Adding the entry "matplotlib.numerix" forces py2exe to import
"random_array", also py2exe gives me some warning errors on other
numerix stuff all the plotting stuff in my application runs again
without errors using matplotlib 0.82.

Best regards
Werner

John Hunter wrote:

···

"Werner" == Werner F Bruhin <werner.bruhin@...185...> writes:

    > Hi John, When creating a py2exe version of my app with the
    > 0.82 build it fails due to an import error on line 96 of
    > numerix.

    > I use numeric and .matplotlibrc is configured accordingly.

    > These __import__ were not present in 0.8, can they savely
    > be removed?

Yes, these are mainly used as a convenience, so that the subpackages
of the numerix module (random_array, mlab, linear_algebra, etc) are
available in the numerix namespace. This enables you to just do a
single import, but the matplotlib code itself does not rely on it if I
recall correctly.

import matplotlib.numerix as nx
nx.linear_algebra.inverse

JDH

-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click