简体   繁体   English

opencv导入错误(libopencv_dnn.so.3.4未定义符号)

[英]opencv import error (libopencv_dnn.so.3.4 undefined symbol)

System information: 系统信息:

Ubuntu 16.04, Anaconda 1.6.9, Python 3.6.4, libopencv 3.4.1, opencv 3.4.1, py-opencv 3.4.1.

Problem definition: I just upgraded my opencv to 3.4 through anaconda and found could not import. 问题定义:我刚刚通过anaconda将opencv升级到3.4 ,发现无法导入。

The import error is: 导入错误是:

ImportError: anaconda3/lib/python3.6/site-packages/../../libopencv_dnn.so.3.4: undefined symbol: _ZNK6google8protobuf7Message25InitializationErrorStringB5cxx11Ev ImportError:anaconda3 / lib / python3.6 / site-packages /../../ libopencv_dnn.so.3.4:未定义的符号:_ZNK6google8protobuf7Message25InitializationErrorStringB5cxx11Ev

以下解决方案对我有用,尽管不确定原因和方式。

  1. conda install -c defaults libprotobuf protobuf
  2. conda install -c menpo opencv3

Have you tried this answer from GitHub : 您是否从GitHub尝试过此答案:

  1. Configure /usr/local/cuda/include/host_config.h as suggested. 根据建议配置/usr/local/cuda/include/host_config.h。 ( remove the gcc 5 error from the CUDA header host_config.h ) 从CUDA标头host_config.h中删除gcc 5错误
  2. sudo apt-get autoremove libprotobuf-dev protobuf-compiler
  3. then compile the protobuf-2.5.0 from src and install Please config the gcc when you compile protobuf ./configure --prefix=/usr/local/ CC=/usr/bin/gcc 然后从src编译protobuf-2.5.0并安装编译protobuf时请配置gcc ./configure --prefix = / usr / local / CC = / usr / bin / gcc

Also (GitHub user groakat mentions): 另外(GitHub用户groakat提到):

for me this problem was caused because I had protobuf installed in anaconda. 对我来说,这个问题是由于在anaconda中安装了protobuf而引起的。 If you have protobuf installed in your anaconda environment, you have to remove all files by hand, as conda uninstall protobuf does not remove all the library files. 如果您在anaconda环境中安装了protobuf,则必须手动删除所有文件,因为conda卸载protobuf不会删除所有库文件。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 安装opencv3.3后,导入cv2会显示“ libopencv_imgcodecs.so.3.1:无法打开共享对象文件” - After installing opencv3.3,import cv2 gives “libopencv_imgcodecs.so.3.1: cannot open shared object file” Python opencv 导入错误(未定义符号)当我运行脚本时,在我安装 ros k.netic 之后 - Python opencv import error(undefined symbol) when i run the script , after i install ros kinetic 无法导入numpy:错误:/usr/lib/liblapack.so.3:未定义的符号:gotoblas - Unable to import numpy: Error: /usr/lib/liblapack.so.3: undefined symbol: gotoblas 导入错误:ephem / _libastro.so未定义符号:PyUnicodeUCS2_AsUTF8String - import error: ephem/_libastro.so undefined symbol: PyUnicodeUCS2_AsUTF8String 张量流导入错误:_pywrap_tensorflow_internal.so:未定义符号:PyClass_Type - tensorflow import error: _pywrap_tensorflow_internal.so: undefined symbol: PyClass_Type Matplotlib导入错误:_backend_gdk.so:未定义的符号:PyArray_SetBaseObject - Matplotlib Import Error : _backend_gdk.so:undefined symbol: PyArray_SetBaseObject 导入Caffe / Scipy错误:liblapack.so.3:未定义符号:sgetrs_N_single - Import caffe/scipy error: liblapack.so.3: undefined symbol: sgetrs_N_single 自定义Python扩展 - 导入错误:未定义的符号 - Custom Python extension - Import error: undefined symbol 无法安装OpenCV Ubuntu(libopencv_core错误) - Impossible to install OpenCV Ubuntu (libopencv_core error) 在Ubuntu 17.04中安装Caffe:导入错误:/usr/lib/libgdal.so.20:未定义的符号:sqlite3_column_table_name - Caffe installation in ubuntu 17.04: Import Error: /usr/lib/libgdal.so.20: undefined symbol: sqlite3_column_table_name
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM