Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NumPy ImportError in python - Dll load failed

I've installed the latest version of numpy from here for python 3.2 on 64-bit Windows Vista for use with matplotlib. However, when I try to import matplotlib, I get the following error:

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

This occurs on the from . import multiarray line in numpy's init.py file

Thanks for any help

like image 816
mg33 Avatar asked Jul 09 '12 22:07

mg33


1 Answers

You are most likely using a 64bit Python with a 32bit numpy or vice versa. Make sure both have the same bitness.

Unless you need 64bit python for some reason it's usually a good idea to stay with 32bit as you might have to compile some binary python packages manually since 32bit binary packages are much more common.

like image 106
ThiefMaster Avatar answered Sep 20 '22 06:09

ThiefMaster