在python中导入cv2时出错

2024-05-20 20:25:29 发布

您现在位置:Python中文网/ 问答频道 /正文

当我在python3中运行import cv2时,我得到以下错误:

This program was compiled against version 2.6.1 of the Protocol Buffer 
 runtime library, which is not compatible with the installed version 
(3.1.0).  Contact the program author for an update.  If you compiled 
the program yourself, make sure that your headers are from the same 
version of Protocol Buffers as your link-time library.  (Version 
verification failed in "/build/mir-ui6vjS/mir-
0.26.3+16.04.20170605/obj-x86_64-linux-
gnu/src/protobuf/mir_protobuf.pb.cc".)
terminate called after throwing an instance of 
'google::protobuf::FatalException'
 what():  This program was compiled against version 2.6.1 of the 
Protocol Buffer runtime library, which is not compatible with the 
installed version (3.1.0).  Contact the program author for an update.  
If you compiled the program yourself, make sure that your headers are 
from the same version of Protocol Buffers as your link-time library.  
(Version verification failed in "/build/mir-ui6vjS/mir-
0.26.3+16.04.20170605/obj-x86_64-linux-
gnu/src/protobuf/mir_protobuf.pb.cc".)
Aborted (core dumped)

我检查了here,它说我需要更新我的头文件。我该怎么做呢?在

命令是什么?在


Tags: oftheanyourversionbufferlibrarythis