-2

I am trying to install matplotlib with pip command on windows 10 but it is giving me an error and exiting with status 1. I have looked for hours to solve this error but couldn't remove the error. Here is the error. Error image 1 Then it creates and copy a lot of files in red font.

I'm also getting exit status 2 at the end. Error image 2

JawadR1
  • 379
  • 3
  • 16
  • Duplicate of [this thread](https://stackoverflow.com/questions/48456125/unable-to-install-matplotlib-using-pip), see accepted answer – crissal Oct 28 '19 at 19:45
  • Thank you for posting but I have already tried this solution. It didn't worked for me. @crissal – JawadR1 Oct 28 '19 at 19:49
  • 1
    Can you try Python 3.7.x instead of Python 3.8? – crissal Oct 28 '19 at 19:50
  • Possible duplicate of [Unable to install matplotlib using pip](https://stackoverflow.com/questions/48456125/unable-to-install-matplotlib-using-pip) – Michal Rosa Oct 28 '19 at 23:22

2 Answers2

1

You are missing freetype which is a required external dependency to build python from source which you need to do because we have not posted py38 wheels for Matplotlib (we are working on it).

For now follow the instructions at https://matplotlib.org/devel/contributing.html#retrieving-and-installing-the-latest-version-of-the-code to set the MPLLOCALFREETYPE=1 enviroment variable to have Matplotlib build a local copy of freetype for you. This will be the default behavior in future releases.

tacaswell
  • 84,579
  • 22
  • 210
  • 199
0

I didn't got the proper answer to why it is giving an error or how to solve it but I solved my issue by switching python 3.8.0 to 3.7.5 as suggested by @crissal in the comment section.

JawadR1
  • 379
  • 3
  • 16