pairwise_distances raises an exception only if the metric comes from scipy.
If the metric is implemented in scikit-learn, it works fine.

I think it should be quite easy to add sparse matrix support. Actually, I
haven't checked but your code might even (almost) support them already.