Matplotlib ImportError: DLL load failed: %1 is not a valid Win32 application

User 2302 | 9/24/2015, 2:21:12 AM

I started an IPython Notebook using the Dato Launcher and entered the following line: import matplotlib.pyplot as plt %matplotlib inline

However I get the following import error: ImportError: DLL load failed: %1 is not a valid Win32 application.

Seems to be a compile error. I tried uninstalling the Matplotlib package then reinstalling it. I didn't get any errors. Then I restarted the IPython Notebook server, however, I'm still getting that import error.

I also have Python 3 installed and when I startup IPython Notebook in that environment Matplotlib works fine but I need Dato's Python environment to use graphlab.


User 1178 | 9/24/2015, 6:24:01 PM

Hi Thomaz,

This seems like a matplotlib specific problem. Quick look around shows a few posts that may help you resolve your issue:

You may be able to google around and find more solution on this issue.

Thanks! Ping

User 2302 | 9/24/2015, 10:47:07 PM

Hi Ping,

Thanks for your comment. I realized the problem was Numpy not Matplotlib. Specifically in the 64bit version of Python 2.

Things I've tried: -I uninstalled all Python versions from my computer then installed "Install GraphLab Create with the Dato Launcher (recommended)" which comes with numpy. I still get the same error.

-I tried uninstalling numpy then installing it back via pip install numpy no installation errors but same import error.

-I tried the same process via conda and no luck either.

-Then I tried installing via windows binaries from here installation was smooth but same import error. My Python2 is 64bit and I installed the 64bit version of numpy.

I tried installing the 32bit version of Python 2 and everything runs smooth there. The 64bit version of Python 3 runs fine too. It seems it's the 64bit version of Python 2 that is giving me a hard time.

Can I use graphlab on the 32bit version of Python 2?