  We consider quasi-perfect codes in $\mathbb{Z}^n$ over the $\ell_p$ metric,
$2 \leq p < \infty$. Through a computational approach, we determine all radii
for which there are linear quasi-perfect codes for $p = 2$ and $n = 2, 3$.
Moreover, we study codes with a certain \textit{degree of imperfection}, a
notion that generalizes the quasi-perfect codes. Numerical results concerning
the codes with the smallest degree of imperfection are presented.
