The one-loop anomalies of a d-dimensional quantum field theory can be computed by evaluating the trace of the path integral jacobian matrix J, regulated by an operator exp(-betaR) and taking the limit beta to zero. Sometime ago Alvarez-Gaume and Witten made the observation that one can simplify this evaluation by replacing the operators which appear in J and R by quantum mechanical operators with the same (anti)commutation relations. By rewriting this quantum mechanical trace as a path integral with periodic boundary conditions at time t = 0 and t = beta for a one-dimensional supersymmetric nonlinear sigma model, they obtained the chiral anomalies for spin-1/2 and spin-3/2 fields and selfdual antisymmetric tensors in d dimensions. One can also apply these ideas to the trace anomalies. Recently a bosonic configuration-space path integral for a particle moving in curved space was proposed by the first author, and the corresponding hamiltonian R was found from the Schrodinger equation. The factors square-root g in the path-integral measure were exponentiated by using scalar ghosts, and the trace anomaly for a scalar field in an external gravitational field in d = 2 was obtained. Here we treat the general case of trace anomalies for external gravitational and Yang-Mills fields. We do not introduce a supersymmetric sigma model, but keep the original Dirac matrices gamma(mu) and internal symmetry generators T(a) in the path integral. As a result, we get a matrix-valued action S. Gauge covariance of the path integral then requires us to define the exponential of the action by time ordering. The computations are simplified by using Riemann normal coordinates. We also replace the scalar ghosts by vector ghosts in order to exhibit the cancellation of all divergences at finite beta more clearly. Finally we compute the trace anomalies in d = 2 and d = 4.