docker中安装jupyter lab失败

报错

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值