We investigate perfect codes in $mathbb{Z}^n$ under the $ell_p$ metric. Upper bounds for the packing radius $r$ of a linear perfect code, in terms of the metric parameter $p$ and the dimension $n$ are derived. For $p = 2$ and $n = 2, 3$, we determine all radii for which there are linear perfect codes. The non-existence results for codes in $mathbb{Z}^n$ presented here imply non-existence results for codes over finite alphabets $mathbb{Z}_q$, when the alphabet size is large enough, and has implications on some recent constructions of spherical codes.