Update:
Much to my relief, I managed to solve the problem.
This is what I did: I went out and bought a new filter cartridge, and redid the filter change. This time, I took extra care in lubricating all the new o-rings, checking and double-checking that the rings were sitting in the right places, and tightening the filter cap sufficiently. And on restarting the car, oil no longer spewed through the small pipe.
I think, as 105gta and buzzbuzz have commented earlier, the culprit was the small o-ring on the nose of the filter cartridge. It was probably not seated correctly. And I think the reason for this was I hadn't sufficiently tightened the filter cap onto the housing. Best to be sure about this next time by using a torque wrench (if I can get one in the narrow space there).
Another two humble suggestions for anyone attempting an oil filter change:
(1) As buzzbuzz has said, best to attach a hose to the small pipe under the filter housing. Massively saves on any spills
(2) remove the small section of plastic that forms a curtain in front of the accessory belt. It is two torx bolts on the left of the piece, one screw on the right, and a bolt at the top that can be accessed from the engine bay. Removing this plastic curtain makes access to the oil filter area much easier!