-1

the error is

C:\>pip install matplotlib
Collecting matplotlib
  Using cached matplotlib-3.3.2.tar.gz (37.9 MB)
 ** On entry to DGEBAL parameter number  3 had an illegal value
 ** On entry to DGEHRD  parameter number  2 had an illegal value
 ** On entry to DORGHR DORGQR parameter number  2 had an illegal value
 ** On entry to DHSEQR parameter number  4 had an illegal value
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\dell\appdata\local\programs\python\python39\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\DELL\\AppData\\Local\\Temp\\pip-install-1_l10b8m\\matplotlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\DELL\\AppData\\Local\\Temp\\pip-install-1_l10b8m\\matplotlib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\DELL\AppData\Local\Temp\pip-pip-egg-info-g_9wqkff'
         cwd: C:\Users\DELL\AppData\Local\Temp\pip-install-1_l10b8m\matplotlib\
    Complete output (62 lines):
    WARNING: The wheel package is not available.

    Edit setup.cfg to change the build options; suppress output with --quiet.

    BUILDING MATPLOTLIB
      matplotlib: yes [3.3.2]
          python: yes [3.9.0 (tags/v3.9.0:9cf6752, Oct  5 2020, 15:34:40) [MSC
                      v.1927 64 bit (AMD64)]]
        platform: yes [win32]
     sample_data: yes [installing]
           tests: no  [skipping due to configuration]
          macosx: no  [Mac OS-X only]

    running egg_info
    creating C:\Users\DELL\AppData\Local\Temp\pip-pip-egg-info-g_9wqkff\matplotlib.egg-info
    writing C:\Users\DELL\AppData\Local\Temp\pip-pip-egg-info-g_9wqkff\matplotlib.egg-info\PKG-INFO
    writing dependency_links to C:\Users\DELL\AppData\Local\Temp\pip-pip-egg-info-g_9wqkff\matplotlib.egg-info\dependency_links.txt
    writing namespace_packages to C:\Users\DELL\AppData\Local\Temp\pip-pip-egg-info-g_9wqkff\matplotlib.egg-info\namespace_packages.txt
    writing requirements to C:\Users\DELL\AppData\Local\Temp\pip-pip-egg-info-g_9wqkff\matplotlib.egg-info\requires.txt
    writing top-level names to C:\Users\DELL\AppData\Local\Temp\pip-pip-egg-info-g_9wqkff\matplotlib.egg-info\top_level.txt
    writing manifest file 'C:\Users\DELL\AppData\Local\Temp\pip-pip-egg-info-g_9wqkff\matplotlib.egg-info\SOURCES.txt'
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\DELL\AppData\Local\Temp\pip-install-1_l10b8m\matplotlib\setup.py", line 242, in <module>
        setup(  # Finally, pass this all along to distutils to do the heavy lifting.
      File "c:\users\dell\appdata\local\programs\python\python39\lib\site-packages\setuptools\__init__.py", line 153, in setup
        return distutils.core.setup(**attrs)
      File "c:\users\dell\appdata\local\programs\python\python39\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "c:\users\dell\appdata\local\programs\python\python39\lib\distutils\dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "c:\users\dell\appdata\local\programs\python\python39\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "c:\users\dell\appdata\local\programs\python\python39\lib\site-packages\setuptools\command\egg_info.py", line 298, in run
        self.find_sources()
      File "c:\users\dell\appdata\local\programs\python\python39\lib\site-packages\setuptools\command\egg_info.py", line 305, in find_sources
        mm.run()
      File "c:\users\dell\appdata\local\programs\python\python39\lib\site-packages\setuptools\command\egg_info.py", line 536, in run
        self.add_defaults()
      File "c:\users\dell\appdata\local\programs\python\python39\lib\site-packages\setuptools\command\egg_info.py", line 572, in add_defaults
        sdist.add_defaults(self)
      File "c:\users\dell\appdata\local\programs\python\python39\lib\distutils\command\sdist.py", line 228, in add_defaults
        self._add_defaults_ext()
      File "c:\users\dell\appdata\local\programs\python\python39\lib\distutils\command\sdist.py", line 311, in _add_defaults_ext
        build_ext = self.get_finalized_command('build_ext')
      File "c:\users\dell\appdata\local\programs\python\python39\lib\distutils\cmd.py", line 299, in get_finalized_command
        cmd_obj.ensure_finalized()
      File "c:\users\dell\appdata\local\programs\python\python39\lib\distutils\cmd.py", line 107, in ensure_finalized
        self.finalize_options()
      File "C:\Users\DELL\AppData\Local\Temp\pip-install-1_l10b8m\matplotlib\setup.py", line 88, in finalize_options
        self.distribution.ext_modules[:] = [
      File "C:\Users\DELL\AppData\Local\Temp\pip-install-1_l10b8m\matplotlib\setup.py", line 91, in <listcomp>
        for ext in package.get_extensions()
      File "C:\Users\DELL\AppData\Local\Temp\pip-install-1_l10b8m\matplotlib\setupext.py", line 345, in get_extensions
        add_numpy_flags(ext)
      File "C:\Users\DELL\AppData\Local\Temp\pip-install-1_l10b8m\matplotlib\setupext.py", line 469, in add_numpy_flags
        import numpy as np
      File "c:\users\dell\appdata\local\programs\python\python39\lib\site-packages\numpy\__init__.py", line 305, in <module>
        _win_os_check()
      File "c:\users\dell\appdata\local\programs\python\python39\lib\site-packages\numpy\__init__.py", line 302, in _win_os_check
        raise RuntimeError(msg.format(__file__)) from None
    RuntimeError: The current Numpy installation ('c:\\users\\dell\\appdata\\local\\programs\\python\\python39\\lib\\site-packages\\numpy\\__init__.py') fails to pass a sanity check due to a bug in the windows runtime. See this issue for more information: 
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Tomer Shetah
  • 8,413
  • 7
  • 27
  • 35

3 Answers3

0

Try installing it with pip3 instead of pip

Oliver Hnat
  • 797
  • 4
  • 19
0

If you have multiple versions of python installed, they can clash, so you should the pip correspondent to your version, I.e. If you are installing matplotlib for python 3.8 then use pip3.8

Wasif
  • 14,755
  • 3
  • 14
  • 34
0

I had the same problem used pip install matplotlib==3.3.1