首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >cffi python包版本不匹配时出错

cffi python包版本不匹配时出错
EN

Stack Overflow用户
提问于 2021-07-30 13:58:45
回答 1查看 723关注 0票数 0

我正在尝试安装一个python软件(https://github.com/GuLinux/AstroPhoto-Plus),但是在日志中,我在安装之后的执行过程中得到了这个错误:

代码语言:javascript
运行
复制
Exception: Version mismatch: this is the 'cffi' package version 1.14.6, located in '/tmp/pip-build-env-kuxyuc2x/overlay/lib/python3.8/site-packages/cffi/api.py'.  
When we import the top-level '_cffi_backend' extension module, we get version 1.14.0, located in '/usr/lib/python3/dist-packages/_cffi_backend.cpython-38-arm-linux-gnueabihf.so'.  The two versions should be equal; check your installation.

据我所知,我有:

代码语言:javascript
运行
复制
hamham@astroloutre:~/www$ pip show cffi
Name: cffi
Version: 1.14.0
Summary: Foreign Function Interface for Python calling C code.
Home-page: http://cffi.readthedocs.org
Author: Armin Rigo, Maciej Fijalkowski
Author-email: python-cffi@googlegroups.com
License: MIT
Location: /home/hamham/.local/lib/python3.8/site-packages
Requires: pycparser
Required-by: 

我正在尝试安装1.14.6版本

代码语言:javascript
运行
复制
hamham@astroloutre:~/www$ pip install --upgrade cffi==1.14.6
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Processing /home/hamham/.cache/pip/wheels/21/a9/81/c074a48686fe8c1ffada1f9e5f53b553c0f766503c0b991c23/cffi-1.14.6-cp38-cp38-linux_armv7l.whl
Requirement already satisfied, skipping upgrade: pycparser in /home/hamham/.local/lib/python3.8/site-packages (from cffi==1.14.6) (2.20)
Installing collected packages: cffi
  Attempting uninstall: cffi
    Found existing installation: cffi 1.14.0
    Uninstalling cffi-1.14.0:
      Successfully uninstalled cffi-1.14.0
Successfully installed cffi-1.14.6

hamham@astroloutre:~/www$ pip show cffi
Name: cffi
Version: 1.14.6
Summary: Foreign Function Interface for Python calling C code.
Home-page: http://cffi.readthedocs.org
Author: Armin Rigo, Maciej Fijalkowski
Author-email: python-cffi@googlegroups.com
License: MIT
Location: /home/hamham/.local/lib/python3.8/site-packages
Requires: pycparser
Required-by: 

重新安装和相同的错误:

代码语言:javascript
运行
复制
 Exception: Version mismatch: this is the 'cffi' package version 1.14.6, located in '/tmp/pip-build-env-34pknb8l/overlay/lib/python3.8/site-packages/cffi/api.py'.  When we import the top-level '_cffi_backend' extension module, we get version 1.14.0, located in '/usr/lib/python3/dist-packages/_cffi_backend.cpython-38-arm-linux-gnueabihf.so'.  The two versions should be equal; check your installation.

我不是python开发人员,尽管我在github上发布了一个问题,但我没有答案(似乎存储库被sinde遗弃了一年),我不知道我能做什么。

谢谢。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-08-11 14:34:47

已解决安装包"python3-cffi“的问题

代码语言:javascript
运行
复制
sudo apt install python3-cffi

和降级pip包:

代码语言:javascript
运行
复制
pip install --upgrade cffi==1.14.0
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/68592184

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档