DonJayamanne / vscodeJupyter

Jupyter for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=donjayamanne.jupyter
MIT License
334 stars 34 forks source link

cant run two times same "cell" when py opencv opens a imshow #118

Open tyoc213 opened 6 years ago

tyoc213 commented 6 years ago

Environment data

VS Code version: 1.22.1 Jupyter Extension version: 1.1.4 OS and version: Linux one 4.13.0-38-generic #43-Ubuntu SMP Wed Mar 14 15:20:44 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Logs

Output from Jupyter output panel

---------------------------------------------------------------------------
error                                     Traceback (most recent call last)
<ipython-input-25-661d1ef45612> in <module>()
      8 print(img)
      9 
---> 10 cv2.imshow('imagen', img)
     11 cv2.waitKey(0)
     12 cv2.destroyAllWindows()

error: /tmp/build/80754af9/opencv_1512491966560/work/modules/highgui/src/window.cpp:611: error: (-2) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function cvShowImage

Output from Console window (Help->Developer Tools menu)

[Extension Host] Timeout
webview.ts:128 [Embedded Page] reloaded results window at time 1523856572333ms
4webview.ts:128 [Embedded Page] [object Object]

Actual behavior

Shows the error

Expected behavior

It should display the cv2 image...

Steps to reproduce:

import numpy as np
import cv2

img = cv2.imread("009713.jpg", 0)
print(img)

cv2.imshow('imagen', img)
cv2.waitKey(0)
tyoc213 commented 6 years ago

Sorry it was my error... or one about how is opencv installed on ubuntu, I solved it with https://stackoverflow.com/a/49018788/682603 which updated/changed a lot of packages, but it is working now.

tyoc213 commented 6 years ago

well, it seems that I can show the image, but I cant run 2 times the "cell", so, I will open the issue again and change the title to "cant run the same cell two times when showing an opencv image 1523864294421.log here is the saved log "