本文主要是介绍ImportError: zstd C API versions mismatch 的参考解决方法,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
文章目录
- 写在前面
- 一、问题描述
- 二、解决方法
- 参考链接
写在前面
自己的测试环境:
Ubuntu20.04
ROS-Noetic
一、问题描述
自己运行 python
程序时出现如下报错:
File "/home/wong/.local/lib/python3.8/site-packages/evo/tools/file_interface.py", line 34, in <module>from rosbags.rosbag2 import (Reader as Rosbag2Reader, Writer as Rosbag2Writer)File "/home/wong/.local/lib/python3.8/site-packages/rosbags/rosbag2/__init__.py", line 11, in <module>from .reader import ReaderFile "/home/wong/.local/lib/python3.8/site-packages/rosbags/rosbag2/reader.py", line 11, in <module>import zstandardFile "/home/wong/.local/lib/python3.8/site-packages/zstandard/__init__.py", line 39, in <module>from .backend_c import * # type: ignore
ImportError: zstd C API versions mismatch; Python bindings were not compiled/linked against expected zstd version (10404 returned by the lib, 10502 hardcoded in zstd headers, 10502 hardcoded in the cext)
二、解决方法
出现上述版本的原因是 zstandard
或者 zstd
未安装,或者版本太老了。重新安装zstandard
或者 zstd
即可解决问题。
pip install --force-reinstall zstandard zstd
然后再次执行 python
程序即可。
参考链接
[1] PHPirate. Conda not working after reinstall - zstandard issue [EB/OL]. https://stackoverflow.com/questions/76266770/conda-not-working-after-reinstall-zstandard-issue, 2023-10-22/2024-08-26.
这篇关于ImportError: zstd C API versions mismatch 的参考解决方法的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!