Hello all,
I am trying to plot things from C using pylab. The configuration:
Window XP 32 bits
Python-2.6.3
numpy-1.3.0
matplotlib-0.99.1.
I can easily do this on Linux, but the same code does not work on Windows. Here is a test program that tries to import pylab:
#include <stdio.h>
#include <Python.h>
int main(void)
{
PyObject * module = NULL;
Py_Initialize();
module = PyImport_ImportModule("matplotlib.pylab");
if(module == NULL || module == Py_None)
{
printf("no\n");
PyErr_Print();
PyErr_Clear();
}
else
{
printf("yes\n");
}
Py_Finalize();
return 0;
}
The code above works fine with Python2.6 and Linux. However, on Windows it fails; here is the output:
no
Traceback (most recent call last):
File "C:\Python26\lib\site-packages\matplotlib\pylab.py", line 206, in <module>
from matplotlib import mpl # pulls in most modules
File "C:\Python26\lib\site-packages\matplotlib\mpl.py", line 1, in <module>
from matplotlib import artist
File "C:\Python26\lib\site-packages\matplotlib\artist.py", line 5, in <module>
from transforms import Bbox, IdentityTransform, TransformedBbox, TransformedPath
File "C:\Python26\lib\site-packages\matplotlib\transforms.py", line 34, in <module>
from matplotlib._path import affine_transform
ImportError: DLL load failed: The specified module could not be found.
Has anybody tried this?
Thanks!
Nick