完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
依照最新esp32_idf下requirements.txt文件安装指出的依赖文件。
其中在安装cryptography文件时,其依赖程序cffi安装失败,错误如下Code: Select all Running setup.py install for cffi ... error ERROR: Complete output from command /usr/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-hwG5QJ/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-I_KmIx/install-record.txt --single-version-externally-managed --compile: ERROR: 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.cygwin-2.6.0-i686-2.7 creating build/lib.cygwin-2.6.0-i686-2.7/cffi copying cffi/api.py -> build/lib.cygwin-2.6.0-i686-2.7/cffi copying cffi/backend_ctypes.py -> build/lib.cygwin-2.6.0-i686-2.7/cffi copying cffi/cffi_opcode.py -> build/lib.cygwin-2.6.0-i686-2.7/cffi copying cffi/commontypes.py -> build/lib.cygwin-2.6.0-i686-2.7/cffi copying cffi/cparser.py -> build/lib.cygwin-2.6.0-i686-2.7/cffi copying cffi/error.py -> build/lib.cygwin-2.6.0-i686-2.7/cffi copying cffi/ffiplatform.py -> build/lib.cygwin-2.6.0-i686-2.7/cffi copying cffi/lock.py -> build/lib.cygwin-2.6.0-i686-2.7/cffi copying cffi/model.py -> build/lib.cygwin-2.6.0-i686-2.7/cffi copying cffi/pkgconfig.py -> build/lib.cygwin-2.6.0-i686-2.7/cffi copying cffi/recompiler.py -> build/lib.cygwin-2.6.0-i686-2.7/cffi copying cffi/setuptools_ext.py -> build/lib.cygwin-2.6.0-i686-2.7/cffi copying cffi/vengine_cpy.py -> build/lib.cygwin-2.6.0-i686-2.7/cffi copying cffi/vengine_gen.py -> build/lib.cygwin-2.6.0-i686-2.7/cffi copying cffi/verifier.py -> build/lib.cygwin-2.6.0-i686-2.7/cffi copying cffi/__init__.py -> build/lib.cygwin-2.6.0-i686-2.7/cffi copying cffi/_cffi_include.h -> build/lib.cygwin-2.6.0-i686-2.7/cffi copying cffi/parse_c_type.h -> build/lib.cygwin-2.6.0-i686-2.7/cffi copying cffi/_embedding.h -> build/lib.cygwin-2.6.0-i686-2.7/cffi copying cffi/_cffi_errors.h -> build/lib.cygwin-2.6.0-i686-2.7/cffi running build_ext building '_cffi_backend' extension creating build/temp.cygwin-2.6.0-i686-2.7 creating build/temp.cygwin-2.6.0-i686-2.7/c gcc -fno-strict-aliasing -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/usr/src/ports/python/python-2.7.10-1.i686/build=/usr/src/debug/python-2.7.10-1 -fdebug-prefix-map=/usr/src/ports/python/python-2.7.10-1.i686/src/Python-2.7.10=/usr/src/debug/python-2.7.10-1 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python2.7 -c c/_cffi_backend.c -o build/temp.cygwin-2.6.0-i686-2.7/c/_cffi_backend.o c/_cffi_backend.c:15:17: 致命错误:ffi.h:No such file or directory 编译中断。 error: command 'gcc' failed with exit status 1 ----------------------------------------ERROR: Command "/usr/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-hwG5QJ/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-I_KmIx/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-hwG5QJ/cffi/ 请问怎么处理? |
|
相关推荐
1个回答
|
|
根据您提供的错误信息,cffi安装失败的原因可能是由于Python环境或权限问题。为了解决这个问题,请按照以下步骤操作:
1. 确保您使用的是正确的Python版本。cffi和cryptography通常需要Python 3.5或更高版本。您可以使用以下命令检查Python版本: ``` python --version ``` 2. 如果您的Python版本低于3.5,请升级到更高版本。您可以使用以下命令安装Python 3.8(或其他更高版本): ``` sudo apt-get update sudo apt-get install python3.8 ``` 3. 确保您使用的是Python 3的pip版本。您可以使用以下命令检查pip版本: ``` pip --version ``` 4. 如果您的pip版本是针对Python 2的,请使用以下命令切换到Python 3的pip: ``` pip3 --version ``` 5. 如果您没有安装pip3,请使用以下命令安装: ``` sudo apt-get install python3-pip ``` 6. 在安装cffi和cryptography之前,确保您的系统已经安装了所有必要的依赖项。您可以使用以下命令安装这些依赖项: ``` sudo apt-get install build-essential libssl-dev libffi-dev python3-dev ``` 7. 使用pip3安装cffi和cryptography: ``` pip3 install cffi pip3 install cryptography ``` 8. 如果您仍然遇到权限问题,尝试使用以下命令以管理员权限运行pip: ``` sudo pip3 install cffi sudo pip3 install cryptography ``` 按照这些步骤操作后,cffi和cryptography应该可以成功安装。如果问题仍然存在,请提供更多详细信息,以便我们能够更好地帮助您解决问题。 |
|
|
|
只有小组成员才能发言,加入小组>>
1142 浏览 1 评论
578浏览 6评论
479浏览 5评论
有没有办法在不使用混杂模式的情况下实现Wifi驱动程序接收缓冲区访问中断呢?
463浏览 5评论
464浏览 4评论
440浏览 4评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-23 00:44 , Processed in 0.759552 second(s), Total 80, Slave 62 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号