Error While Installing Matplotlib

Installing matplotlib using pip gives error

If you're using Windows, the easiest way to install many of the numerically-oriented Python packages is to download one of wheels containing pre-compiled binaries from http://www.lfd.uci.edu/~gohlke/pythonlibs/, and install using pip:

pip install SomePackage-1.0-py2.py3-none-any.whl

Make sure to download the right wheel version (Python2 or Python3, 32 bit or 64 bit) for your Python installation.

Python, Error while installing matplotlib

edit: matplotlib has now released wheels for python 3.9 so pip install --upgrade matplotlib should work.

original answer

matplotlib hasn't made a wheel yet for version 3.9 so your python attempted to build it from source. You should downgrade to python 3.8 and then everything should work

Cannot install Matplotlib on Python 3.10

Matplotlib doesn't support Python 3.10 at the moment, so you have the following options.

  1. See this answer for detailed instructions to downgrade to Python 3.9.
  2. Install the pre-release version of Matplotlib which does support Python 3.10. This can be done with the command pip install matplotlib==3.5.0rc1 (and is what I would recommend doing).

Error in installing Matplotlib : fatal error C1083

You have python 3.8, not python 3.7.

But there are no python 3.8 wheels available for matplotlib 3.1.1 on pypi. So best remove python 3.8 completely and install python 3.7.

When you then run python -m pip install matplotlib it will install the compiled version from the wheels, so there is no need to compile anything yourself or have Microsoft Studio available.

Errors when installing MatPlotLib

I found it! Although Python 3.9 not having a wheel for installing Matplotib was a problem and the main problem (thanks @rocketsfallonrocketfalls and @Mr. T for finding that out), it seems that there's a problem on windows when installing NumPy, which was another dependency of the epispot package, which if you remember, was the package I was trying to install. Because of this, when using Python 3.8, it gave me a different error. You can find details here - https://github.com/numpy/numpy/issues/16739.

Now, the solution to this, at least, the solution I'm using is to use Anaconda's Python version, and then clone the epispot package from the source on Github into project directory (I can remove all the extra files and just the epispot folder). Since Numpy comes with Anaconda, I have numpy, matplotlib, and epispot.

Matplotlib Installation issues with Python 3.10

Not totally sure, but I ran into the same issue. After some digging and testing I think I've found out that Matplotlib, and pylab aren't compatible with python3.10 yet. For the time being I've kept python3.9 along with 3.10 so whenever I use matplotlib, numpy, or pylab, I just use version 3.9.



Related Topics



Leave a reply



Submit