cffi python 包不匹配的错误版本

Error version of cffi python package mismatch

我正在尝试安装 python 软件 (https://github.com/GuLinux/AstroPhoto-Plus),但在日志中,我在安装后执行期间遇到此错误:

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.

据我所知,我有:

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 版本

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: 

重新安装和同样的错误:

 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 中发布了一个问题,但我没有答案(似乎存储库已被放弃一年),我没有知道我能做什么。

谢谢。

通过安装包“python3-cffi”解决了

sudo apt install python3-cffi

并降级 pip 包:

pip install --upgrade cffi==1.14.0