You're looking for the cdist scipy function. It will calculate the pair-wise distances (euclidean by default) between two sets of n-dimensional matrices.
from scipy.spatial.distance import cdist
import numpy as np
X = np.arange(10).reshape(-1,2)
Y = np.arange(10).reshape(-1,2)
cdist(X, Y)
[[ 0. 2.82842712 5.65685425 8.48528137 11.3137085 ]
[ 2.82842712 0. 2.82842712 5.65685425 8.48528137]
[ 5.65685425 2.82842712 0. 2.82842712 5.65685425]
[ 8.48528137 5.65685425 2.82842712 0. 2.82842712]
[ 11.3137085 8.48528137 5.65685425 2.82842712 0. ]]