문제

My OS is 64 bit Windows My Python is 32 bit. I use PyDev in Eclipse

What version of Matplotlib should I install?

For both 32 bit and 64 bit I get problems:

I am just struggling to run this little module.

Please help!

도움이 되었습니까?

해결책 2

I've had similar issues with matplotlib 32-bits on python 2.7 32-bits and Windows 7 64-bits. I remember I needed to manually install a couple of other packages such as dateutil and pyparsing. You might find below link useful.

Problem With Matplotlib installation

or you can use compiled installers from the link below. You'll need the following dependencies: numpy, dateutil, pytz, pyparsing, six

Unofficial Windows Binaries for Python Extension Packages by Christoph Gohlke

다른 팁

These are the downloads you need for Matplotlib to run with Python 2.7 in windows:

numPy: http://sourceforge.net/projects/numpy/files/NumPy/1.9.0/numpy-1.9.0-win32-superpack-python2.7.exe/download

numpy is currently available for Windows only in 32-bit format

Checking your numpy works:

import numpy as np a = np.arange(10) a

dateutil and six: cmd cd\ cd python27\scripts pip2.7 install python-dateutil

This should install six as well

pyparsing and pytz: pip2.7 install pyparsing pip2.7 install pytz

matplotlib: http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.4.3/windows/matplotlib-1.4.3.win32-py2.7.exe/download?use_mirror=liquidtelecom

Checking to see if your matplotlib finally works:

from matplotlib import pyplot pyplot.plot([1, 2, 3, 4], [1, 4, 9, 16]) pyplot.show()

Hope this helps Mohammad Saeed

Same issue here and had to fix multiple times. The best solution I found was...

(1) If you don't already have PIP installed, install with instructions on https://pip.pypa.io/en/latest/installing.html (referenced on python.org site).

(2) Install numpy with unofficial binaries here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy.

(3) Then install matplotlib with PIP via command pip install matplotlib This will install all dependencies correctly (other than numpy which required the manual installation).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top