在Python 3.6.8中安装libgtk2.0-dev和pkg-config :: Anaconda

时间:2019-03-19 11:43:31

标签: python python-3.x opencv image-processing cv2

我想使用OpenCV库运行python脚本,但是它不起作用。

import requests as rq
import numpy as np 
import cv2 as cv 
url = "http://10.100.18.151:8080/shot.jpg"
while True:
    pic_resp = rq.get(url)
    pic_array = np.array(bytearray(pic_resp.content),dtype=np.uint8)
    img = cv.imdecode(pic_array, -1)
    cv.imshow("camera",img)

但我收到此错误:

enter image description here

  

SP:我安装了gtk2.0-dev和pkg-config

0 个答案:

没有答案