报错
Building wheels for collected packages: cffi
Running setup.py bdist_wheel for cffi ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-jpwh1_kc/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-6v0z4jmz --python-tag cp35:
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
No package 'libffi' 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
No package 'libffi' 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
No package 'libffi' 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
No package 'libffi' 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
No package 'libffi' found
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.5
creating build/lib.linux-x86_64-3.5/cffi
copying cffi/setuptools_ext.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/vengine_gen.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/ffiplatform.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/cffi_opcode.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/model.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/pkgconfig.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/verifier.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/commontypes.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/lock.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/vengine_cpy.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/error.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/__init__.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/recompiler.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/cparser.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/backend_ctypes.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/api.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/_cffi_include.h -> build/lib.linux-x86_64-3.5/cffi
copying cffi/parse_c_type.h -> build/lib.linux-x86_64-3.5/cffi
copying cffi/_embedding.h -> build/lib.linux-x86_64-3.5/cffi
copying cffi/_cffi_errors.h -> build/lib.linux-x86_64-3.5/cffi
running build_ext
building '_cffi_backend' extension
creating build/temp.linux-x86_64-3.5
creating build/temp.linux-x86_64-3.5/c
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python3.5m -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.5/c/_cffi_backend.o
c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Failed building wheel for cffi
Running setup.py clean for cffi
Failed to build cffi
Installing collected packages: wcwidth, prompt-toolkit, pygments, backcall, parso, jedi, pexpect, pickleshare, ipython, python-dateutil, pyzmq, nest-asyncio, jupyter-client, ipykernel, nbformat, testpath, defusedxml, entrypoints, pandocfilters, mistune, webencodings, pyparsing, packaging, bleach, nbconvert, prometheus-client, cffi, argon2-cffi, notebook, idna, chardet, urllib3, certifi, requests, jupyterlab-server, jupyterlab
Running setup.py install for cffi ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-jpwh1_kc/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-u6mnyj37/install-record.txt --single-version-externally-managed --compile:
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
No package 'libffi' 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
No package 'libffi' 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
No package 'libffi' 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
No package 'libffi' 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
No package 'libffi' found
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.5
creating build/lib.linux-x86_64-3.5/cffi
copying cffi/setuptools_ext.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/vengine_gen.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/ffiplatform.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/cffi_opcode.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/model.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/pkgconfig.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/verifier.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/commontypes.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/lock.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/vengine_cpy.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/error.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/__init__.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/recompiler.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/cparser.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/backend_ctypes.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/api.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/_cffi_include.h -> build/lib.linux-x86_64-3.5/cffi
copying cffi/parse_c_type.h -> build/lib.linux-x86_64-3.5/cffi
copying cffi/_embedding.h -> build/lib.linux-x86_64-3.5/cffi
copying cffi/_cffi_errors.h -> build/lib.linux-x86_64-3.5/cffi
running build_ext
building '_cffi_backend' extension
creating build/temp.linux-x86_64-3.5
creating build/temp.linux-x86_64-3.5/c
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python3.5m -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.5/c/_cffi_backend.o
c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-jpwh1_kc/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-u6mnyj37/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-jpwh1_kc/cffi/
You are using pip version 18.0, however version 20.3.4 is available.
You should consider upgrading via the 'pip install --upgrade pip' command
关键处: No package ‘libffi’ found
解决方法
apt-get install libffi-dev
参考:https://stackoverflow.com/questions/56031697/getting-error-no-package-libffi-found-when-installing-python-telegram-bot
|