【问题标题】:ERROR: Failed building wheel for [Python Package] | Issue with wheels (sometimes) [duplicate]错误:[Python 包] 的构建轮失败 |车轮问题(有时)[重复]
【发布时间】:2021-02-20 02:41:47
【问题描述】:

每当我安装需要轮子的 python 包时,我都会收到此错误:

$ 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>=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]
 = '"'"'C:\\Users\\MYUSERNAME\\AppData\\Local\\Temp\\pip-install-8tqnlgrn\\pywavelets\\setup.py'"'"'; __file__='"'"'C:\\Users\\MYUSERNAME\\Ap
pData\\Local\\Temp\\pip-install-8tqnlgrn\\pywavelets\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read
().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' 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 "<string>", line 1, in <module>
    File "C:\Users\MYUSERNAME\AppData\Local\Temp\pip-install-8tqnlgrn\pywavelets\setup.py", line 477, in <module>
      setup_package()
    File "C:\Users\MYUSERNAME\AppData\Local\Temp\pip-install-8tqnlgrn\pywavelets\setup.py", line 467, in setup_package
      ext_modules = get_ext_modules(USE_CYTHON)
    File "C:\Users\MYUSERNAME\AppData\Local\Temp\pip-install-8tqnlgrn\pywavelets\setup.py", line 182, in get_ext_modules
      from numpy import get_include as get_numpy_include
    File "c:\users\MYUSERNAME\appdata\local\programs\python\python39\lib\site-packages\numpy\__init__.py", line 305, in <module>
      _win_os_check()
    File "c:\users\MYUSERNAME\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\\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]
 = '"'"'C:\\Users\\MYUSERNAME\\AppData\\Local\\Temp\\pip-install-8tqnlgrn\\pywavelets\\setup.py'"'"'; __file__='"'"'C:\\Users\\MYUSERNAME\\Ap
pData\\Local\\Temp\\pip-install-8tqnlgrn\\pywavelets\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read
().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' 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] = '"'"'C:\\Users\\MYUSERNAME\\AppData\\Local\\Temp\\pip-install-8tqnlgrn\\pywavelets\\setup.py'"'"'; __file__='"'"'C:\\Users\\MYUSERNAME\\
AppData\\Local\\Temp\\pip-install-8tqnlgrn\\pywavelets\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.re
ad().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' 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 "<string>", line 1, in <module>
      File "C:\Users\MYUSERNAME\AppData\Local\Temp\pip-install-8tqnlgrn\pywavelets\setup.py", line 477, in <module>
        setup_package()
      File "C:\Users\MYUSERNAME\AppData\Local\Temp\pip-install-8tqnlgrn\pywavelets\setup.py", line 467, in setup_package
        ext_modules = get_ext_modules(USE_CYTHON)
      File "C:\Users\MYUSERNAME\AppData\Local\Temp\pip-install-8tqnlgrn\pywavelets\setup.py", line 182, in get_ext_modules
        from numpy import get_include as get_numpy_include
      File "c:\users\MYUSERNAME\appdata\local\programs\python\python39\lib\site-packages\numpy\__init__.py", line 305, in <module>
        _win_os_check()
      File "c:\users\MYUSERNAME\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\\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] = '"'"'C:\\Users\\MYUSERNAME\\AppData\\Local\\Temp\\pip-install-8tqnlgrn\\pywavelets\\setup.py'"'"';
 __file__='"'"'C:\\Users\\MYUSERNAME\\AppData\\Local\\Temp\\pip-install-8tqnlgrn\\pywavelets\\setup.py'"'"';f=getattr(tokenize, '"'"'ope
n'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))
' 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.

我不知道这是轮子还是点子的问题!

这些是我的系统规格:

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

如您所见,我正在使用 BASH for Windows!任何事情都会有所帮助!

(同样,PyWavelets 只是一个例子!很多包都会发生这种情况)

我不知道为什么会这样,我今天重新安装了 python 等等。这台机器上的大多数东西都相当新鲜和清晰。如果您能从这些错误中读出任何内容,如果您能在此处发布,我将不胜感激。

【问题讨论】:

    标签: python-3.x windows bash pip scikit-image


    【解决方案1】:

    Windows 中存在导致此问题的错误,如错误消息所示。

    临时解决方案是使用 numpy 1.19.3。你有 1.19.4。

    pip uninstall numpy
    pip install numpy==1.19.3
    

    然后再次运行您的安装脚本。

    来自this 微软线程修复将于 2021 年 1 月左右推出。

    【讨论】:

    【解决方案2】:

    发生这种情况是因为我使用的是相当新的 Python3.9,这就是为什么我使用的包(包括 wheel)都不起作用的原因。这是一个 python 错误。

    安装 python 3.8(并将其添加到 PATH)解决了这个问题

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-12-07
      • 1970-01-01
      • 1970-01-01
      • 2020-09-07
      • 1970-01-01
      • 2023-02-09
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多