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.

1 Answer 1

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).

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you so much I installed WinPython and it is great!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.