Hi,
A colleague of mine uses Python on Windows. When he upgraded to matplotlib 0.90 (from 0.82, I think) he started getting an import error when importing pylab. We tried many combinations and the only thing that fixed it was downgrading back to 0.82.
We tried:
python2.4 and python2.5
numpy 1.0.1 and 1.0.2
matplotlib 0.90 and 0.87.7
We got the same error with all of those combinations. The error message was an "ImportError: DLL load failed", when doing "from matplotlib._ns_transforms import *". It is the same problem that others reported earlier:
http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg02841.html
All of our installs were from the .exe Windows binaries, not source compilations, and in all cases import numpy, numpy.test(1), and import matplotlib produced no errors.
Note that we have not installed either Numeric or numarray, but we tried adding Numeric and it didn't help.
Has anyone found a solution? We'd like to upgrade to a matplotlib later that 0.87.5 to get matplotlib.patches.Ellipse().
Thanks,
-- Paul
Hi Paul,
Paul Ray wrote:
Hi,
A colleague of mine uses Python on Windows. When he upgraded to matplotlib 0.90 (from 0.82, I think) he started getting an import error when importing pylab. We tried many combinations and the only thing that fixed it was downgrading back to 0.82.
We tried:
python2.4 and python2.5
numpy 1.0.1 and 1.0.2
matplotlib 0.90 and 0.87.7
What backend are you using?
If you use wxPython then as of 0.87.? something you need to either use wxPython 2.6 Unicode or rename the following file:
matplot\backends\_wxagg.pyd
to
matplot\backends\_wxagg DO NOT USE.pyd (or something similar).
The 0.87 version was compiled against wxPython 2.6 to take accelarate some functions, by renaming the above file you basically deactive this accelaration code.
I believe the next version of matplotlib will get rid of this dependency.
Werner
I'm not 100% sure. We certainly didn't intentionally use wxPython, since I don't even know what it is. The only packages we installed were python, numpy, and matplotlib. I think his backend is TkAgg, but I can't check since it was on my colleagues computer and he is on travel today. (All the rest of us us python/numpy/matplotlib on Macs or Linux and everything is fine with 0.90)
I know there are a bunch of .pyd files in his matplotlib directory. Are those Windows DLL versions of packages? As far as I could tell the relevant one "_ns_transforms.pyd" is there, so I'm not sure why it is having trouble finding it (though I'm working from memory here).
Cheers,
-- Paul
···
On May 10, 2007, at 10:34 AM, Werner F. Bruhin wrote:
What backend are you using?
If you use wxPython then as of 0.87.? something you need to either use wxPython 2.6 Unicode or rename the following file:
Hi Paul,
Paul Ray wrote:
What backend are you using?
If you use wxPython then as of 0.87.? something you need to either use wxPython 2.6 Unicode or rename the following file:
I'm not 100% sure. We certainly didn't intentionally use wxPython, since I don't even know what it is.
It is a Python wrapping of wxWidgets, much nicer then Tk in my view.
The only packages we installed were python, numpy, and matplotlib. I think his backend is TkAgg, but I can't check since it was on my colleagues computer and he is on travel today. (All the rest of us us python/numpy/matplotlib on Macs or Linux and everything is fine with 0.90)
If you or he uses TkAgg then I have no idea what might cause the problem.
Should you have a small matplotlib script which shows the problem I'll give it a try on my setup (XP or Vista with Python 2.5 and numpy.
I know there are a bunch of .pyd files in his matplotlib directory. Are those Windows DLL versions of packages? As far as I could tell the relevant one "_ns_transforms.pyd" is there, so I'm not sure why it is having trouble finding it (though I'm working from memory here).
Someone more technical has to explain that, but I believe you right in saying that the .pyd files are a kind of a DLL on Windows.
Werner
···
On May 10, 2007, at 10:34 AM, Werner F. Bruhin wrote:
No need for a script. "import pylab" produces the error.
If you are using Windows XP, Python 2.5, numpy 1.0.2, and matplotlib 0.90, then you have the same setup that is causing us the error. What other packages do you have installed. My guess is that there is some dependency we are not satisfying?
Thanks for your help,
-- Paul
···
On May 10, 2007, at 11:05 AM, Werner F. Bruhin wrote:
Should you have a small matplotlib script which shows the problem I'll give it a try on my setup (XP or Vista with Python 2.5 and numpy.
Paul,
Paul Ray wrote:
Should you have a small matplotlib script which shows the problem I'll give it a try on my setup (XP or Vista with Python 2.5 and numpy.
No need for a script. "import pylab" produces the error.
No problem here with this.
Just tried the example \matplotlib\examples\animation_blit_tk.py and that runs fine too (except it does not shut down nicely if has not done it's 1000 iterations:)).
If you are using Windows XP, Python 2.5, numpy 1.0.2, and matplotlib 0.90, then you have the same setup that is causing us the error. What other packages do you have installed. My guess is that there is some dependency we are not satisfying?
This was on Vista, Python 2.5, matplotlib 0.90, numpy 1.0.1. (can't try this config on XP, still have 0.82 installed on there at the moment)
If you look at _transforms.py _ns_transforms is imported for numpy. So, maybe your version of numpy is too far ahead?
Thanks for your help,
You are welcome.
Werner
···
On May 10, 2007, at 11:05 AM, Werner F. Bruhin wrote: