In this paper and its sequel, we construct a set of finite energy smooth initial data for which the corresponding solutions to the compressible three-dimensional Navier-Stokes and Euler equations implode (with infinite density) at a later time at a point, and we completely describe the associated formation of singularity. This paper is concerned with existence of smooth self-similar profiles for the barotropic Euler equations in dimension $d\ge 2$ with decaying density at spatial infinity. The phase portrait of the nonlinear ODE governing the equation for spherically symmetric self-similar solutions has been introduced in the pioneering work of Guderley. It allows us to construct global profiles of the self-similar problem, which however turn out to be generically non-smooth across the associated acoustic cone. In a suitable range of barotropic laws and for a sequence of quantized speeds accumulating to a critical value, we prove the existence of non-generic $\mathcal C^\infty $ self-similar solutions with suitable decay at infinity. The $\mathcal C^\infty $ regularity is used in a fundamental way in our companion paper (part II) in the analysis of the associated linearized operator and leads, in turn, to the construction of finite energy blow up solutions of the compressible Euler and Navier-Stokes equations in dimensions $d=2,3$.