In this paper, we report direct calculations of cavitating pipe flows by the method of Space-Time Conservation Element and Solution Element, or the CE/SE method for short. The tenet of the CE/SE method is treating space and time as one entity, and the calculation of flow properties is based on the local and global space-time flux conservation. As a contrast to the modern upwind schemes, no Riemann solver is used, thus the logic of the present scheme for cavitating flows is much simpler. Two numerical examples are reported in this paper: (1) a hydraulic shock problem, and (2) a cavitating pipe flow. For the hydraulic shock problem, we demonstrate the capability of the CE/SE method for capturing contact discontinuities in cavitating fluids. For the pipe flows, a two-phase homogeneous equilibrium cavitation model is employed. In both cases, numerical results compared favorably with the experimental data and analytical solution.