title: ERROR: Failed building wheel for [Python Package] | Issue with wheels (sometimes)
body: <p>Whenever I install a python package that requires wheels, I get this error:</p>
  <pre><code>$ pip install PyWavelets
  Collecting PyWavelets
    Downloading PyWavelets-1.1.1.tar.gz (4.6 MB)
       |████████████████████████████████| 4.6 MB 344 kB/s
  Requirement already satisfied: numpy&gt;=1.13.3 in c:\users\MYUSERNAME\appdata\local\programs\python\python39\lib\site-packages (from PyWav
  elets) (1.19.4)
  Building wheels for collected packages: PyWavelets
    Building wheel for PyWavelets (setup.py) ... - ** 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
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\MYUSERNAME\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0]
   = '&quot;'&quot;'C:\\Users\\MYUSERNAME\\AppData\\Local\\Temp\\pip-install-8tqnlgrn\\pywavelets\\setup.py'&quot;'&quot;'; __file__='&quot;'&quot;'C:\\Users\\MYUSERNAME\\Ap
  pData\\Local\\Temp\\pip-install-8tqnlgrn\\pywavelets\\setup.py'&quot;'&quot;';f=getattr(tokenize, '&quot;'&quot;'open'&quot;'&quot;', open)(__file__);code=f.read
  ().replace('&quot;'&quot;'\r\n'&quot;'&quot;', '&quot;'&quot;'\n'&quot;'&quot;');f.close();exec(compile(code, __file__, '&quot;'&quot;'exec'&quot;'&quot;'))' bdist_wheel -d 'C:\Users\MYUSERNAME\Ap
  pData\Local\Temp\pip-wheel-ns2hq1xm'
         cwd: C:\Users\MYUSERNAME\AppData\Local\Temp\pip-install-8tqnlgrn\pywavelets\
    Complete output (15 lines):
    C:\Users\MYUSERNAME\AppData\Local\Temp\pip-install-8tqnlgrn\pywavelets\setup.py:62: DeprecationWarning: the imp module is deprecated i
  n favour of importlib; see the module's documentation for alternative uses
      import imp
    Traceback (most recent call last):
      File &quot;&lt;string&gt;&quot;, line 1, in &lt;module&gt;
      File &quot;C:\Users\MYUSERNAME\AppData\Local\Temp\pip-install-8tqnlgrn\pywavelets\setup.py&quot;, line 477, in &lt;module&gt;
        setup_package()
      File &quot;C:\Users\MYUSERNAME\AppData\Local\Temp\pip-install-8tqnlgrn\pywavelets\setup.py&quot;, line 467, in setup_package
        ext_modules = get_ext_modules(USE_CYTHON)
      File &quot;C:\Users\MYUSERNAME\AppData\Local\Temp\pip-install-8tqnlgrn\pywavelets\setup.py&quot;, line 182, in get_ext_modules
        from numpy import get_include as get_numpy_include
      File &quot;c:\users\MYUSERNAME\appdata\local\programs\python\python39\lib\site-packages\numpy\__init__.py&quot;, line 305, in &lt;module&gt;
        _win_os_check()
      File &quot;c:\users\MYUSERNAME\appdata\local\programs\python\python39\lib\site-packages\numpy\__init__.py&quot;, line 302, in _win_os_check
        raise RuntimeError(msg.format(__file__)) from None
    RuntimeError: The current Numpy installation ('c:\\users\\MYUSERNAME\\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: https:/
  /STACKOVERFLOW DOESN'T LIKE TINYURL
    ----------------------------------------
    ERROR: Failed building wheel for PyWavelets
    Running setup.py clean for PyWavelets
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\MYUSERNAME\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0]
   = '&quot;'&quot;'C:\\Users\\MYUSERNAME\\AppData\\Local\\Temp\\pip-install-8tqnlgrn\\pywavelets\\setup.py'&quot;'&quot;'; __file__='&quot;'&quot;'C:\\Users\\MYUSERNAME\\Ap
  pData\\Local\\Temp\\pip-install-8tqnlgrn\\pywavelets\\setup.py'&quot;'&quot;';f=getattr(tokenize, '&quot;'&quot;'open'&quot;'&quot;', open)(__file__);code=f.read
  ().replace('&quot;'&quot;'\r\n'&quot;'&quot;', '&quot;'&quot;'\n'&quot;'&quot;');f.close();exec(compile(code, __file__, '&quot;'&quot;'exec'&quot;'&quot;'))' clean --all
         cwd: C:\Users\MYUSERNAME\AppData\Local\Temp\pip-install-8tqnlgrn\pywavelets
    Complete output (11 lines):
    C:\Users\MYUSERNAME\AppData\Local\Temp\pip-install-8tqnlgrn\pywavelets\setup.py:62: DeprecationWarning: the imp module is deprecated i
  n favour of importlib; see the module's documentation for alternative uses
      import imp
  
    `setup.py clean` is not supported, use one of the following instead:
  
      - `git clean -xdf` (cleans all files)
      - `git clean -Xdf` (cleans all versioned files, doesn't touch
                          files that aren't checked into the git repo)
  
    Add `--force` to your command to use it anyway if you must (unsupported).
  
    ----------------------------------------
    ERROR: Failed cleaning build dir for PyWavelets
  Failed to build PyWavelets
  Installing collected packages: PyWavelets
      Running setup.py install for PyWavelets ... - ** 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
      ERROR: Command errored out with exit status 1:
       command: 'c:\users\MYUSERNAME\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[
  0] = '&quot;'&quot;'C:\\Users\\MYUSERNAME\\AppData\\Local\\Temp\\pip-install-8tqnlgrn\\pywavelets\\setup.py'&quot;'&quot;'; __file__='&quot;'&quot;'C:\\Users\\MYUSERNAME\\
  AppData\\Local\\Temp\\pip-install-8tqnlgrn\\pywavelets\\setup.py'&quot;'&quot;';f=getattr(tokenize, '&quot;'&quot;'open'&quot;'&quot;', open)(__file__);code=f.re
  ad().replace('&quot;'&quot;'\r\n'&quot;'&quot;', '&quot;'&quot;'\n'&quot;'&quot;');f.close();exec(compile(code, __file__, '&quot;'&quot;'exec'&quot;'&quot;'))' install --record 'C:\Users\erik
  u\AppData\Local\Temp\pip-record-apt8ex91\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\us
  ers\MYUSERNAME\appdata\local\programs\python\python39\Include\PyWavelets'
           cwd: C:\Users\MYUSERNAME\AppData\Local\Temp\pip-install-8tqnlgrn\pywavelets\
      Complete output (24 lines):
      C:\Users\MYUSERNAME\AppData\Local\Temp\pip-install-8tqnlgrn\pywavelets\setup.py:62: DeprecationWarning: the imp module is deprecated
   in favour of importlib; see the module's documentation for alternative uses
        import imp
  
      Note: if you need reliable uninstall behavior, then install
      with pip instead of using `setup.py install`:
  
        - `pip install .`       (from a git repo or downloaded source
                                 release)
        - `pip install PyWavelets`   (last PyWavelets release on PyPI)
  
  
      Traceback (most recent call last):
        File &quot;&lt;string&gt;&quot;, line 1, in &lt;module&gt;
        File &quot;C:\Users\MYUSERNAME\AppData\Local\Temp\pip-install-8tqnlgrn\pywavelets\setup.py&quot;, line 477, in &lt;module&gt;
          setup_package()
        File &quot;C:\Users\MYUSERNAME\AppData\Local\Temp\pip-install-8tqnlgrn\pywavelets\setup.py&quot;, line 467, in setup_package
          ext_modules = get_ext_modules(USE_CYTHON)
        File &quot;C:\Users\MYUSERNAME\AppData\Local\Temp\pip-install-8tqnlgrn\pywavelets\setup.py&quot;, line 182, in get_ext_modules
          from numpy import get_include as get_numpy_include
        File &quot;c:\users\MYUSERNAME\appdata\local\programs\python\python39\lib\site-packages\numpy\__init__.py&quot;, line 305, in &lt;module&gt;
          _win_os_check()
        File &quot;c:\users\MYUSERNAME\appdata\local\programs\python\python39\lib\site-packages\numpy\__init__.py&quot;, line 302, in _win_os_check
          raise RuntimeError(msg.format(__file__)) from None
      RuntimeError: The current Numpy installation ('c:\\users\\MYUSERNAME\\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: https
  :STACKOVERFLOW DOESN'T LIKE TINYURL
      ----------------------------------------
  ERROR: Command errored out with exit status 1: 'c:\users\MYUSERNAME\appdata\local\programs\python\python39\python.exe' -u -c 'import sys
  , setuptools, tokenize; sys.argv[0] = '&quot;'&quot;'C:\\Users\\MYUSERNAME\\AppData\\Local\\Temp\\pip-install-8tqnlgrn\\pywavelets\\setup.py'&quot;'&quot;';
   __file__='&quot;'&quot;'C:\\Users\\MYUSERNAME\\AppData\\Local\\Temp\\pip-install-8tqnlgrn\\pywavelets\\setup.py'&quot;'&quot;';f=getattr(tokenize, '&quot;'&quot;'ope
  n'&quot;'&quot;', open)(__file__);code=f.read().replace('&quot;'&quot;'\r\n'&quot;'&quot;', '&quot;'&quot;'\n'&quot;'&quot;');f.close();exec(compile(code, __file__, '&quot;'&quot;'exec'&quot;'&quot;'))
  ' install --record 'C:\Users\MYUSERNAME\AppData\Local\Temp\pip-record-apt8ex91\install-record.txt' --single-version-externally-managed -
  -compile --install-headers 'c:\users\MYUSERNAME\appdata\local\programs\python\python39\Include\PyWavelets' Check the logs for full comma
  nd output.
  </code></pre>
  <p>I do not know whether this is an issue with wheel or pip!</p>
  <p>These are my system specs:</p>
  <pre><code>Host Name:                 DESKTOP
  OS Name:                   Microsoft Windows 10 Pro
  OS Version:                10.0.19041 N/A Build 19041
  OS Manufacturer:           Microsoft Corporation
  OS Configuration:          Standalone Workstation
  OS Build Type:             Multiprocessor Free
  Registered Owner:          (not leaking my E-Mail here, folks)
  Registered Organization:   N/A
  Product ID:                (not leaking this either)
  Original Install Date:     15/08/2020, 22:55:17
  System Boot Time:          07/11/2020, 09:52:30
  System Manufacturer:       Micro-Star International Co., Ltd.
  System Model:              MS-7B09
  System Type:               x64-based PC
  Processor(s):              1 Processor(s) Installed.
                             [01]: AMD64 Family 23 Model 1 Stepping 1 AuthenticAMD ~3500 Mhz
  BIOS Version:              American Megatrends Inc. A.70, 14/11/2018
  Windows Directory:         C:\WINDOWS
  System Directory:          C:\WINDOWS\system32
  Boot Device:               \Device\HarddiskVolume6
  System Locale:             en-us;English (United States)
  Input Locale:              (take a wild guess)
  Time Zone:                 (Im always awake)
  Total Physical Memory:     65.428 MB
  Available Physical Memory: 52.078 MB
  Virtual Memory: Max Size:  75.156 MB
  Virtual Memory: Available: 52.887 MB
  Virtual Memory: In Use:    22.269 MB
  Page File Location(s):     C:\pagefile.sys
  Domain:                    WORKGROUP
  Logon Server:              \\DESKTOP
  </code></pre>
  <p>As you see, I'm using BASH for Windows! Anything will help!</p>
  <p>(again, PyWavelets is just an example here! This happens with a lot of packages)</p>
  <p>I do not know why this occurs, I reinstalled python just today etc. Most things on this machine are fairly fresh and clear. If you can read anything out of these errors, I'd be very thankful if you could post it here.</p>