4

When I installed matplotlib in my 64-bit windows it require numpy. Then i installed numpy and again matplotlib then it says that

    numpy: 1.7.1
freetype2: found, but unknown version (no pkg-config)
           * WARNING: Could not find 'freetype2' headers in any
           * of 'win32_static\include', '.',
           * 'win32_static\include\freetype2', '.\freetype2'.

and I tried in python

import numpy

there is no error

but when i tried

import matplotlib

shows error

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named matplotlib

What may be the solution ?

Bishnu Bhattarai
  • 2,800
  • 8
  • 36
  • 44

2 Answers2

3

softpedia is not an 'official' host for mpl binaries, see http://matplotlib.org/downloads.html


Download matplotlib from here and install it. It had included all dependencies.

tacaswell
  • 84,579
  • 22
  • 210
  • 199
nKandel
  • 2,543
  • 1
  • 29
  • 47
2

If you want to install Matplotlib from the source, you need the following tools:

Built dependencies

  • Python (2.x supported)
  • Numpy (> 1.1)
  • libpng (> 1.1)
  • FreeType (> 1.4)

The windows installer for Matplotlib should already include libpng and FreeType. However, obviously your matplotlib can't find the FreeType installation.

You could search your PC for a FreeType installation and give the path to matplotlib, so it can find the required files. If FreeType is not installed, you should do that, although it should be included in the windows installer.

Marius
  • 523
  • 4
  • 14
  • Neither I got any 'Free Type' file in matplotlib installer of windows and nor I got any setup file downloaded from here(http://download.savannah.gnu.org/releases/freetype/) What may be the solution for it ? – Bishnu Bhattarai Apr 19 '13 at 14:55
  • Can you please tell where you downloaded the matplotlib installer from? Freetype for Windows can for Example be found here: http://gnuwin32.sourceforge.net/packages/freetype.htm However, i couldn't Check it Out yet since i haven't had access to a win pc. – Marius Apr 19 '13 at 17:50