We study the Anderson transition for three-dimensional (3D) $N times N times N$ tightly bound cubic lattices where both real and imaginary parts of onsite energies are independent random variables distributed uniformly between $-W/2$ and $W/2$. Such a non-Hermitian analog of the Anderson model is used to describe random-laser medium with local loss and amplification. We employ eigenvalue statistics to search for the Anderson transition. For 25% smallest-modulus complex eigenvalues we find the average ratio $r$ of distances to the first and the second nearest neighbor as a function of $W$. For a given $N$ the function $r(W)$ crosses from $0.72$ to 2/3 with a growing $W$ demonstrating a transition from delocalized to localized states. When plotted at different $N$ all $r(W)$ cross at $W_c = 6.0 pm 0.1$ (in units of nearest neighbor overlap integral) clearly demonstrating the 3D Anderson transition. We find that in the non-Hermitian 2D Anderson model, the transition is replaced by a crossover.