Resolve call‘ plt.show () ‘no image after

Call in code plt.show No img image is displayed after ()

import matplotlib.pyplot as plt
plt.imshow(img)

The solution is as follows:

First, add the following in the header file:

import pylab

Then in the original code plt.show (IMG) add the following:

pylab.show()

As shown in the figure, the picture can be displayed normally

Read More: