Proof of quantization of magnetic charge of monopoles using homotopy groups

Suppose we place a monopole at the origin $\{{\bf 0}\}$, and the gauge field is well-definded in region $\mathbb R^3-\{0\}$ which is homomorphic to a sphere $S^2$.

Then the total manifold is $U(1)$ fibers attached to base $S^2$. We may ask how many types of "phase texture" are there on a sphere?

Then I use $\pi_2 (U(1)) = \pi_2(S^1)$ since we established the map $S^2\mapsto U(1) \sim S^1$.

But $\pi_2 (S^1) = 0$ not $\mathbb Z$!! Where I got wrong? According to the famous book Topology and Geometry for Physicists, the correct formula should be $$\pi_1(S^1) = \mathbb Z$$ Why $\pi_1$?

-
Did you mean $\mathbb R^3-\{0\}$ is homeomorphic to $S^2$? And if so, notice that the first space is non-compact (in particular it is not a boundary subset of $\mathbb R^3$) while $S^2$ is compact, so this statement alone is not true. –  joshphysics Feb 1 at 8:35
Maybe "homotopically equivalent to" would be more appropriate. –  twistor59 Feb 1 at 8:44
Yeah thanks; wasn't sure what he was trying to say there, and note that in my previous comment "boundary subset" should be replaced by "bounded subset." –  joshphysics Feb 1 at 8:45
You want to specify how much "twist" there is in a $U(1)$ (i.e. effectively $S^1$) bundle over $S^2$. If you cover $S^2$ with a North and South patch, then the transition region is topologically $S^1$ so the bundle is classified by maps $S^1$ to $U(1)$, i.e. you want $\pi_1(U(1))=\pi_1(S^1) = \mathbb{Z}$
I see. Does it apply to all closesd 2D surfaces with non-zero curvature? e.g. a $T^2$? In this case the TKNN invariant also reads $\pi_1 (U(1)) = \mathbb Z$ –  ChenChao Feb 1 at 9:08
$T^2$ means $S^1XS^1$? If so, then yes, I think in this case the circle bundles are classified by $H^2(M;\mathbb{Z})$ which is again the integers - the Euler class. –  twistor59 Feb 1 at 11:32