A-A+
ERROR: Could not build wheels for multidict which use PEP 517 and cannot be installed directly

【注意:此文章为博主原创文章!转载需注意,请带原文链接,至少也要是txt格式!】
ERROR: Could not build wheels for multidict which use PEP 517 and cannot be installed directly
解决方案在最下面,如果不想看错误,就直接拉到最下面即可。
这里我们先看错误:
这里是某个软件的报错
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | Looking in indexes: http://mirrors.aliyun.com/pypi/simple/ Collecting aiohttp==3.6.2 Downloading http://mirrors.aliyun.com/pypi/packages/c2/f7/f0ad3dbace4762fef5d80aa4124b41bf218e4c4dd6d387a86cede707d9a4/aiohttp-3.6.2-py3-none-any.whl (441 kB) |████████████████████████████████| 441 kB 28.0 MB/s Collecting multidict<5.0,>=4.5 Downloading http://mirrors.aliyun.com/pypi/packages/61/b4/475114b3f1671da634f89239e61038f8742d9ac13aa34b32a05bf8022d22/multidict-4.7.5.tar.gz (50 kB) |████████████████████████████████| 50 kB 2.2 MB/s Installing build dependencies ... done Getting requirements to build wheel ... done Preparing wheel metadata ... done Collecting attrs>=17.3.0 Downloading http://mirrors.aliyun.com/pypi/packages/a2/db/4313ab3be961f7a763066401fb77f7748373b6094076ae2bda2806988af6/attrs-19.3.0-py2.py3-none-any.whl (39 kB) Collecting async-timeout<4.0,>=3.0 Downloading http://mirrors.aliyun.com/pypi/packages/e1/1e/5a4441be21b0726c4464f3f23c8b19628372f606755a9d2e46c187e65ec4/async_timeout-3.0.1-py3-none-any.whl (8.2 kB) Collecting chardet<4.0,>=2.0 Downloading http://mirrors.aliyun.com/pypi/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133 kB) |████████████████████████████████| 133 kB 22.5 MB/s Collecting yarl<2.0,>=1.0 Downloading http://mirrors.aliyun.com/pypi/packages/d6/67/6e2507586eb1cfa6d55540845b0cd05b4b77c414f6bca8b00b45483b976e/yarl-1.4.2.tar.gz (163 kB) |████████████████████████████████| 163 kB 20.9 MB/s Collecting idna>=2.0 Downloading http://mirrors.aliyun.com/pypi/packages/89/e3/afebe61c546d18fb1709a61bee788254b40e736cff7271c7de5de2dc4128/idna-2.9-py2.py3-none-any.whl (58 kB) |████████████████████████████████| 58 kB 13.0 MB/s Building wheels for collected packages: multidict, yarl Building wheel for multidict (PEP 517) ... error ERROR: Command errored out with exit status 1: command: /usr/bin/python3.8 /usr/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmpongj_lu6 cwd: /tmp/pip-install-ajiqgw7_/multidict Complete output (47 lines): ********************** * Accellerated build * ********************** running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-3.8 creating build/lib.linux-x86_64-3.8/multidict copying multidict/__init__.py -> build/lib.linux-x86_64-3.8/multidict copying multidict/_abc.py -> build/lib.linux-x86_64-3.8/multidict copying multidict/_compat.py -> build/lib.linux-x86_64-3.8/multidict copying multidict/_multidict_base.py -> build/lib.linux-x86_64-3.8/multidict copying multidict/_multidict_py.py -> build/lib.linux-x86_64-3.8/multidict running egg_info writing multidict.egg-info/PKG-INFO writing dependency_links to multidict.egg-info/dependency_links.txt writing top-level names to multidict.egg-info/top_level.txt reading manifest file 'multidict.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no previously-included files matching '*.pyc' found anywhere in distribution warning: no previously-included files found matching 'multidict/_multidict.html' warning: no previously-included files found matching 'multidict/*.so' warning: no previously-included files found matching 'multidict/*.pyd' warning: no previously-included files found matching 'multidict/*.pyd' no previously-included directories found matching 'docs/_build' writing manifest file 'multidict.egg-info/SOURCES.txt' copying multidict/__init__.pyi -> build/lib.linux-x86_64-3.8/multidict copying multidict/_multidict.c -> build/lib.linux-x86_64-3.8/multidict copying multidict/py.typed -> build/lib.linux-x86_64-3.8/multidict creating build/lib.linux-x86_64-3.8/multidict/_multilib copying multidict/_multilib/defs.h -> build/lib.linux-x86_64-3.8/multidict/_multilib copying multidict/_multilib/dict.h -> build/lib.linux-x86_64-3.8/multidict/_multilib copying multidict/_multilib/istr.h -> build/lib.linux-x86_64-3.8/multidict/_multilib copying multidict/_multilib/iter.h -> build/lib.linux-x86_64-3.8/multidict/_multilib copying multidict/_multilib/pair_list.h -> build/lib.linux-x86_64-3.8/multidict/_multilib copying multidict/_multilib/views.h -> build/lib.linux-x86_64-3.8/multidict/_multilib running build_ext building 'multidict._multidict' extension creating build/temp.linux-x86_64-3.8 creating build/temp.linux-x86_64-3.8/multidict gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Os -fomit-frame-pointer -g -Os -fomit-frame-pointer -g -Os -fomit-frame-pointer -g -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/usr/include/python3.8 -c multidict/_multidict.c -o build/temp.linux-x86_64-3.8/multidict/_multidict.o -O2 -std=c99 -Wall -Wsign-compare -Wconversion -fno-strict-aliasing -pedantic multidict/_multidict.c:1:10: fatal error: Python.h: No such file or directory 1 | #include "Python.h" | ^~~~~~~~~~ compilation terminated. error: command 'gcc' failed with exit status 1 ---------------------------------------- ERROR: Failed building wheel for multidict Building wheel for yarl (setup.py) ... error ERROR: Command errored out with exit status 1: command: /usr/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ajiqgw7_/yarl/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ajiqgw7_/yarl/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 /tmp/pip-wheel-x2aw__q3 cwd: /tmp/pip-install-ajiqgw7_/yarl/ Complete output (40 lines): ********************** * Accellerated build * ********************** running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-3.8 creating build/lib.linux-x86_64-3.8/yarl copying yarl/__init__.py -> build/lib.linux-x86_64-3.8/yarl copying yarl/quoting.py -> build/lib.linux-x86_64-3.8/yarl running egg_info writing yarl.egg-info/PKG-INFO writing dependency_links to yarl.egg-info/dependency_links.txt writing requirements to yarl.egg-info/requires.txt writing top-level names to yarl.egg-info/top_level.txt reading manifest file 'yarl.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no previously-included files matching '*.pyc' found anywhere in distribution warning: no previously-included files matching '*.cache' found anywhere in distribution warning: no previously-included files found matching 'yarl/_quoting.html' warning: no previously-included files found matching 'yarl/_quoting.*.so' warning: no previously-included files found matching 'yarl/_quoting.pyd' warning: no previously-included files found matching 'yarl/_quoting.*.pyd' no previously-included directories found matching 'docs/_build' writing manifest file 'yarl.egg-info/SOURCES.txt' copying yarl/__init__.pyi -> build/lib.linux-x86_64-3.8/yarl copying yarl/_quoting.c -> build/lib.linux-x86_64-3.8/yarl copying yarl/_quoting.pyx -> build/lib.linux-x86_64-3.8/yarl copying yarl/py.typed -> build/lib.linux-x86_64-3.8/yarl running build_ext building 'yarl._quoting' extension creating build/temp.linux-x86_64-3.8 creating build/temp.linux-x86_64-3.8/yarl gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Os -fomit-frame-pointer -g -Os -fomit-frame-pointer -g -Os -fomit-frame-pointer -g -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/usr/include/python3.8 -c yarl/_quoting.c -o build/temp.linux-x86_64-3.8/yarl/_quoting.o yarl/_quoting.c:4:10: fatal error: Python.h: No such file or directory 4 | #include "Python.h" | ^~~~~~~~~~ compilation terminated. error: command 'gcc' failed with exit status 1 ---------------------------------------- ERROR: Failed building wheel for yarl Running setup.py clean for yarl Failed to build multidict yarl ERROR: Could not build wheels for multidict which use PEP 517 and cannot be installed directly |
注意,这是另一个软件的报错!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | Installing build dependencies ... error ERROR: Command errored out with exit status 1: command: /usr/local/bin/python /usr/local/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-3j7f8lqj/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com -- 'setuptools>=40.6.0' wheel 'cffi>=1.8,!=1.11.3; platform_python_implementation != '"'"'PyPy'"'"'' cwd: None Complete output (143 lines): Looking in indexes: http://mirrors.aliyun.com/pypi/simple/ Collecting setuptools>=40.6.0 Downloading http://mirrors.aliyun.com/pypi/packages/a0/df/635cdb901ee4a8a42ec68e480c49f85f4c59e8816effbf57d9e6ee8b3588/setuptools-46.1.3-py3-none-any.whl (582kB) Collecting wheel Downloading http://mirrors.aliyun.com/pypi/packages/8c/23/848298cccf8e40f5bbb59009b32848a4c38f4e7f3364297ab3c3e2e2cd14/wheel-0.34.2-py2.py3-none-any.whl Collecting cffi!=1.11.3,>=1.8 Downloading http://mirrors.aliyun.com/pypi/packages/05/54/3324b0c46340c31b909fcec598696aaec7ddc8c18a63f2db352562d3354c/cffi-1.14.0.tar.gz (463kB) Collecting pycparser (from cffi!=1.11.3,>=1.8) Downloading http://mirrors.aliyun.com/pypi/packages/ae/e7/d9c3a176ca4b02024debf82342dab36efadfc5776f9c8db077e8f6e71821/pycparser-2.20-py2.py3-none-any.whl (112kB) Building wheels for collected packages: cffi Building wheel for cffi (setup.py): started Building wheel for cffi (setup.py): finished with status 'error' ERROR: Command errored out with exit status 1: command: /usr/local/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-6bzgluxz/cffi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-6bzgluxz/cffi/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 /tmp/pip-wheel-i5a02sj4 --python-tag cp37 cwd: /tmp/pip-install-6bzgluxz/cffi/ Complete output (56 lines): Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing `libffi.pc' to the PKG_CONFIG_PATH environment variable Package 'libffi', required by 'virtual:world', not found Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing `libffi.pc' to the PKG_CONFIG_PATH environment variable Package 'libffi', required by 'virtual:world', not found Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing `libffi.pc' to the PKG_CONFIG_PATH environment variable Package 'libffi', required by 'virtual:world', not found Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing `libffi.pc' to the PKG_CONFIG_PATH environment variable Package 'libffi', required by 'virtual:world', not found Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing `libffi.pc' to the PKG_CONFIG_PATH environment variable Package 'libffi', required by 'virtual:world', not found running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-3.7 creating build/lib.linux-x86_64-3.7/cffi copying cffi/vengine_cpy.py -> build/lib.linux-x86_64-3.7/cffi copying cffi/model.py -> build/lib.linux-x86_64-3.7/cffi copying cffi/commontypes.py -> build/lib.linux-x86_64-3.7/cffi copying cffi/error.py -> build/lib.linux-x86_64-3.7/cffi copying cffi/backend_ctypes.py -> build/lib.linux-x86_64-3.7/cffi copying cffi/cparser.py -> build/lib.linux-x86_64-3.7/cffi copying cffi/ffiplatform.py -> build/lib.linux-x86_64-3.7/cffi copying cffi/pkgconfig.py -> build/lib.linux-x86_64-3.7/cffi copying cffi/vengine_gen.py -> build/lib.linux-x86_64-3.7/cffi copying cffi/api.py -> build/lib.linux-x86_64-3.7/cffi copying cffi/lock.py -> build/lib.linux-x86_64-3.7/cffi copying cffi/__init__.py -> build/lib.linux-x86_64-3.7/cffi copying cffi/setuptools_ext.py -> build/lib.linux-x86_64-3.7/cffi copying cffi/cffi_opcode.py -> build/lib.linux-x86_64-3.7/cffi copying cffi/verifier.py -> build/lib.linux-x86_64-3.7/cffi copying cffi/recompiler.py -> build/lib.linux-x86_64-3.7/cffi copying cffi/_cffi_include.h -> build/lib.linux-x86_64-3.7/cffi copying cffi/parse_c_type.h -> build/lib.linux-x86_64-3.7/cffi copying cffi/_embedding.h -> build/lib.linux-x86_64-3.7/cffi copying cffi/_cffi_errors.h -> build/lib.linux-x86_64-3.7/cffi running build_ext building '_cffi_backend' extension creating build/temp.linux-x86_64-3.7 creating build/temp.linux-x86_64-3.7/c gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/usr/local/include/python3.7m -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.7/c/_cffi_backend.o c/_cffi_backend.c:15:10: fatal error: ffi.h: No such file or directory #include <ffi.h> ^~~~~~~ compilation terminated. error: command 'gcc' failed with exit status 1 ---------------------------------------- ERROR: Failed building wheel for cffi Running setup.py clean for cffi Failed to build cffi Installing collected packages: setuptools, wheel, pycparser, cffi Running setup.py install for cffi: started Running setup.py install for cffi: finished with status 'error' ERROR: Command errored out with exit status 1: command: /usr/local/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-6bzgluxz/cffi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-6bzgluxz/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-rde68z5s/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-3j7f8lqj/overlay --compile cwd: /tmp/pip-install-6bzgluxz/cffi/ Complete output (56 lines): Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing `libffi.pc' to the PKG_CONFIG_PATH environment variable Package 'libffi', required by 'virtual:world', not found Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing `libffi.pc' to the PKG_CONFIG_PATH environment variable Package 'libffi', required by 'virtual:world', not found Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing `libffi.pc' to the PKG_CONFIG_PATH environment variable Package 'libffi', required by 'virtual:world', not found Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing `libffi.pc' to the PKG_CONFIG_PATH environment variable Package 'libffi', required by 'virtual:world', not found Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing `libffi.pc' to the PKG_CONFIG_PATH environment variable Package 'libffi', required by 'virtual:world', not found running install running build running build_py creating build creating build/lib.linux-x86_64-3.7 creating build/lib.linux-x86_64-3.7/cffi copying cffi/vengine_cpy.py -> build/lib.linux-x86_64-3.7/cffi copying cffi/model.py -> build/lib.linux-x86_64-3.7/cffi copying cffi/commontypes.py -> build/lib.linux-x86_64-3.7/cffi copying cffi/error.py -> build/lib.linux-x86_64-3.7/cffi copying cffi/backend_ctypes.py -> build/lib.linux-x86_64-3.7/cffi copying cffi/cparser.py -> build/lib.linux-x86_64-3.7/cffi copying cffi/ffiplatform.py -> build/lib.linux-x86_64-3.7/cffi copying cffi/pkgconfig.py -> build/lib.linux-x86_64-3.7/cffi copying cffi/vengine_gen.py -> build/lib.linux-x86_64-3.7/cffi copying cffi/api.py -> build/lib.linux-x86_64-3.7/cffi copying cffi/lock.py -> build/lib.linux-x86_64-3.7/cffi copying cffi/__init__.py -> build/lib.linux-x86_64-3.7/cffi copying cffi/setuptools_ext.py -> build/lib.linux-x86_64-3.7/cffi copying cffi/cffi_opcode.py -> build/lib.linux-x86_64-3.7/cffi copying cffi/verifier.py -> build/lib.linux-x86_64-3.7/cffi copying cffi/recompiler.py -> build/lib.linux-x86_64-3.7/cffi copying cffi/_cffi_include.h -> build/lib.linux-x86_64-3.7/cffi copying cffi/parse_c_type.h -> build/lib.linux-x86_64-3.7/cffi copying cffi/_embedding.h -> build/lib.linux-x86_64-3.7/cffi copying cffi/_cffi_errors.h -> build/lib.linux-x86_64-3.7/cffi running build_ext building '_cffi_backend' extension creating build/temp.linux-x86_64-3.7 creating build/temp.linux-x86_64-3.7/c gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/usr/local/include/python3.7m -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.7/c/_cffi_backend.o c/_cffi_backend.c:15:10: fatal error: ffi.h: No such file or directory #include <ffi.h> ^~~~~~~ compilation terminated. error: command 'gcc' failed with exit status 1 ---------------------------------------- ERROR: Command errored out with exit status 1: /usr/local/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-6bzgluxz/cffi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-6bzgluxz/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-rde68z5s/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-3j7f8lqj/overlay --compile Check the logs for full command output. WARNING: You are using pip version 19.2.1, however version 20.0.2 is available. You should consider upgrading via the 'pip install --upgrade pip' command. ---------------------------------------- ERROR: Command errored out with exit status 1: /usr/local/bin/python /usr/local/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-3j7f8lqj/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com -- 'setuptools>=40.6.0' wheel 'cffi>=1.8,!=1.11.3; platform_python_implementation != '"'"'PyPy'"'"'' Check the logs for full command output. WARNING: You are using pip version 19.2.1, however version 20.0.2 is available. You should consider upgrading via the 'pip install --upgrade pip' command. |
报错解决方案:
###第一步,升级pip,命令如下:
pip install --upgrade pip
###第二步,根据里面的报错内容,可以推断出::
###'setuptools>=40.6.0' wheel 'cffi>=1.8,!=1.11.3 版本太低。
###下面更新版本
pip3 install --no-cache-dir -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com "cffi"
pip3 install --no-cache-dir -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com "setuptools"
##然后再次
pip3 install --no-cache-dir -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com -r requirements.txt
##全部搞定!!!
布施恩德可便相知重
微信扫一扫打赏
支付宝扫一扫打赏