如何解决错误:[Python程序包]的构建轮失败|车轮问题有时
每当我安装需要轮子的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,'"'"'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,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)(__file__);code=f.re
ad().replace('"'"'\r\n'"'"','"'"'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>",in <module>
File "C:\Users\MYUSERNAME\AppData\Local\Temp\pip-install-8tqnlgrn\pywavelets\setup.py",in <module>
setup_package()
File "C:\Users\MYUSERNAME\AppData\Local\Temp\pip-install-8tqnlgrn\pywavelets\setup.py",in setup_package
ext_modules = get_ext_modules(USE_CYTHON)
File "C:\Users\MYUSERNAME\AppData\Local\Temp\pip-install-8tqnlgrn\pywavelets\setup.py",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",in <module>
_win_os_check()
File "c:\users\MYUSERNAME\appdata\local\programs\python\python39\lib\site-packages\numpy\__init__.py",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,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'"'"','"'"'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
如您所见,我正在Windows上使用BASH!一切都会有帮助的!
(同样,PyWavelets只是这里的一个例子!很多软件包都会发生这种情况)
我不知道为什么会这样,我今天才重新安装了python等。这台机器上的大多数东西都相当新鲜和清晰。如果您能从这些错误中读取任何内容,请将此内容发布在此非常感谢。
解决方法
如错误消息中所示,Windows中存在一个导致此问题的错误。
临时解决方案是使用numpy 1.19.3。您有1.19.4。
pip uninstall numpy
pip install numpy==1.19.3
然后再次运行安装脚本。
从this开始,Microsoft线程修复将在2021年1月左右提供。
,发生这种情况是因为我使用的是相当新的Python3.9,这就是为什么我使用的所有软件包(包括wheel)都无法正常工作的原因。这是python错误。
安装python 3.8(并将其添加到PATH)解决了该问题
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。