I found the solution. As this question is unique and not covered anywhere. So, posting the answer.
#from skimage.measure import structural_similarity as ssim
from skimage import measure
.
.
.
#s = ssim(imageA, imageB)
s = measure.compare_ssim(imageA, imageB)
Change commented line to uncommented line.