Cannot import matplotlib in Python 3
Question: 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](http://stackoverflow.com/questions/8605847/how-
to-install-matplotlib-with-python3-2)

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

[![enter image description
here](http://i.stack.imgur.com/iasty.png)](http://i.stack.imgur.com/iasty.png)

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.


Answer: Yes. Matplotlib has some dependencies that need to be installed in order for
the library to function fully.
[Quoting](http://matplotlib.org/users/installing.html#installing-from-source):

> 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](http://matplotlib.org/users/installing.html#build-requirements).
If this process seems somewhat complex (it sometimes is) you can consider
Python distributions such as:

1) [WinPython](http://winpython.github.io/)

2) [Python XY](https://python-xy.github.io/)

3) [Anaconda](https://www.continuum.io/downloads)

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

