I am using Data science toolbox running ubuntu 14.04 through vagrant in windows. I installed OpenCV and tried a very simple python code.
import cv2
import numpy as np
import matplotlib.pyplot as plt
img = cv2.imread('image1.jpg' , cv2.IMREAD_GRAYSCALE)
cv2.imshow('image' , img)
cv2.waitKey(0)
cv2.destroyAllwindows()
When i run this code i get an error -
(image:1267): Gtk-WARNING **: cannot open display:
I have searched on internet but not able to find a solution working for me.
I have tried -
export DISPLAY=:0.0
export DISPLAY=:0
and many more. I have also tried xhost +localhost but this gives another error
xhost: unable to open display ""
Anyone know a way to solve this problem.