Import cv2 error python

亡梦爱人 提交于 2020-01-15 07:11:29

问题


Whenever I attempt to import cv2, I always get this error

import cv2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: /usr/lib/libgdal.so.1: undefined symbol: sqlite3_column_table_name

I've already created a symbolic link and I have also already installed the libgdal-dev module from the Ubuntu Software Center. Any ideas? Thanks!

EDIT: I did as pbu suggested, and the link was created without fail for the most part. But now, this error comes up:

import cv2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: /usr/local/lib/libgdal.so.1: cannot read file data: Is a directory

Thank you all for your suggestions!


回答1:


was happen same with me , resolved after :

GDAL 2.1 is available for Ubuntu 16.04 from the UbuntuGIS-Unstable PPA

sudo apt install gdal-bin python-gdal python3-gdal


来源:https://stackoverflow.com/questions/31273224/import-cv2-error-python

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!