The trace anomaly of the energy-momentum tensor is usually quoted in the form which is proportional to the beta function of the theory. However, there are in general many definitions of gauge couplings depending on renormalization schemes, and hence many beta functions. In particular, N = 1 supersymmetric pure Yang-Mills has the holomorphic gauge coupling whose beta function is oneloop exact, and the canonical gauge coupling whose beta function is given by the Novikov-Shifman-Vainshtein-Zakharov beta function. In this paper, we study which beta function should appear in the trace anomaly in N = 1 pure Yang-Mills. We calculate the trace anomaly by employing the N = 4 regularization of N = 1 pure Yang-Mills. It is shown that the trace anomaly is given by one-loop exact form if the composite operator appearing in the trace anomaly is renormalized in a preferred way. This result gives the simplest resolution to the anomaly puzzle in N = 1 pure Yang-Mills. The most important point is to examine in which scheme the quantum action principle is valid, which is crucial in the derivation of the trace anomaly.