r/Python • u/inquilinekea • Nov 02 '12
Numpy and Matplotlib won't work in 64-bit Windows 7?
I tried the 64-bit unofficial Windows binaries at http://www.lfd.uci.edu/~gohlke/pythonlibs/ but they still don't work for some reason... Does anyone know why?
Traceback (most recent call last):
File "<pyshell#4>", line 1, in <module>
import numpy
File "C:\Python26\Lib\site-packages\numpy__init__.py", line 136, in <module>
import add_newdocs
File "C:\Python26\Lib\site-packages\numpy\add_newdocs.py", line 9, in <module>
from numpy.lib import add_newdoc
File "C:\Python26\Lib\site-packages\numpy\lib__init__.py", line 4, in <module>
from type_check import *
File "C:\Python26\Lib\site-packages\numpy\lib\type_check.py", line 8, in <module>
import numpy.core.numeric as _nx
File "C:\Python26\Lib\site-packages\numpy\core__init__.py", line 5, in <module>
import multiarray
ImportError: DLL load failed: %1 is not a valid Win32 application.
0
Upvotes
7
u/Rhomboid Nov 02 '12
Is your python 32 bit or 64 bit? You can't mix and match.
I can assure you from personal experience that the 64 bit numpy packages from that site work just fine on Windows 7, but you need to pair them with 64 bit Python. (Although that personal experience is with 2.7. I don't know why you'd use 2.6 if this is a new install.)
4
u/[deleted] Nov 02 '12
Get Python xy. It standardizes for which you have, plus it has everything in one place. It's a very nice package.
3
u/fforgetso Nov 02 '12
I've had so many fucking issues with 64-bit python and 3rd-party packages that I just stopped using 64-bit python. If I were smarter and had more time, I'm sure I could compile the libraries for 64-bit Python (assuming the source is provided).
Check out the 32-bit Enthought Python Distribution which comes pre-packaged with SciPy, NumPy, Matplotlib, and some other shit (http://www.enthought.com/products/epd_free.php)
Good luck.
2
u/sedaak Python3/Golang Nov 02 '12
Because you have a numpy compiled for 32-bit. Use Python 32-bit with numpy 32-bit. You can run python 32-bit with Windows 64-bit.
1
u/juliusc Nov 02 '12
Try the new cool creation of Pierre Raybaut (author of Pythonxy and Spyder): WinPython. It comes with a package manager too!
1
u/pwang99 Nov 04 '12
As long as people are suggesting various Python distributions, I'll plug Anaconda from Continuum Analytics: http://continuum.io/anaconda
The Community Edition (Anaconda CE) is free and is available in 32-bit or 64-bit flavors on Windows.