【发布时间】:2014-11-16 21:00:24
【问题描述】:
我正在尝试在使用 Ubuntu 14.04 的系统上从 Python 中使用 OpenCV。当我尝试导入 cv2 时,出现以下错误:
me@Bedrock1:~$ python
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: libavcodec.so.53: cannot open shared object file: No such file or directory
搜索 libavcodec.so.53 显示我的系统只有 libavcodec.so.54。
互联网搜索显示 libavcodec.so.53 已从 14.04 存储库 (http://www.ubuntuupdates.org/package/core/trusty/universe/base/libavcodec53) 中删除。这可能解释了我无法 apt-get 安装这个库:
me@Bedrock1:~$ sudo apt-get install libavcodec53 libavcodec-extra-53
...
E: Package 'libavcodec53' has no installation candidate
E: Package 'libavcodec-extra-53' has no installation candidate
不幸的是,现在我真的被困住了。
有没有办法让 cv2 模块使用 libavcodec.so.54,或者找到并安装 libavcodec.so.53 的方法?
注意:我刚刚尝试按照https://help.ubuntu.com/community/OpenCV 的说明重新安装
但我仍然收到相同的 libavcodec.so.53 错误....
【问题讨论】:
标签: python opencv ubuntu ubuntu-14.04