0

I want to install matplotlib on windows. To do this I tried those lines,

git clone https://github.com/matplotlib/matplotlib
cd matplotlib
py setup.py build
py setup.py install

which I found at this link

But I think the installation does not succesfully occured. This is result of py setup.py install:

enter image description here

So still following imports does not work;

import matplotlib.pyplot as plt
import matplotlib.animation as animation

An error says Unresolved import. So I am supposing this is because freetype and png did not installed.

Now I found freetype.dll and installed it but where should I put that file?

Any idea about this problem.

Community
  • 1
  • 1
Hilal
  • 902
  • 2
  • 22
  • 47

1 Answers1

0

Yes. Matplotlib has some dependencies that need to be installed in order for the library to function fully. Quoting:

Once you have satisfied the requirements detailed below (mainly python, numpy, libpng and freetype), you can build matplotlib:

cd matplotlib python setup.py build python setup.py install

To be sure of the correct procedure check the build instructions. If this process seems somewhat complex (it sometimes is) you can consider Python distributions such as:

1) WinPython

2) Python XY

3) Anaconda

, that already bring several libraries by default and making it a lot easier to work with Python (and extensions).

armatita
  • 12,825
  • 8
  • 48
  • 49