gpt4 book ai didi

Python-opencv 导入错误,已安装包

转载 作者:太空宇宙 更新时间:2023-11-03 23:10:54 26 4
gpt4 key购买 nike

我已经按照此处所述安装了 opencv:https://docs.opencv.org/3.4/d2/de6/tutorial_py_setup_in_ubuntu.html

---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-2-5c56e811bdd3> in <module>()
11
12 import os
---> 13 import cv2
14 import sys
15 import copy

/jet/var/python/lib/python3.6/site-packages/cv2/__init__.py in <module>()
1 import importlib
2
----> 3 from .cv2 import *
4 from .data import *
5

ImportError: libgthread-2.0.so.0: cannot open shared object file: No such file or directory

已经完成:

sudo apt-get install libglib2.0-0:am​​d64

sudo apt-get update
sudo apt-get install libgtk2.0-dev

!apt-get update
!apt-get -y upgrade
!pip install opencv-python
!apt-get install libgtk2.0-dev -y

!apt-get install python-opencv -y --allow-unauthenticated

最佳答案

尝试:

sudo apt-get update

然后:

sudo apt-get install libgtk2.0-dev 

如果这不起作用尝试:

!apt-get update
!apt-get -y upgrade
!pip install opencv-python
!apt-get install libgtk2.0-dev -y

关于Python-opencv 导入错误,已安装包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50416416/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com