Homotopy equivalent iff isomorphic homotopy groups? Is it true that two spaces or $\infty$-groupoids are homotopy equivalent if and only if they have isomorphic homotopy groups?
 A: It is not true in general: the simplest counterexample is given by $S^3\times\mathbb{RP}^2$ and $S^2\times\mathbb{RP}^3$. Their fundamental group is $\mathbb{Z}/2\mathbb{Z}$ and higher homotopy groups are isomorphic since both spaces have $S^2\times S^3$ as universal cover, however it is easily shown that they are not homotopy equivalent by computing for example $H_5(S^3\times\mathbb{RP}^2)=0$ and $H_5(S^2\times\mathbb{RP}^3)=\mathbb{Z}$ (or simply noticing that $S^2\times\mathbb{RP}^3$ is orientable while $S^3\times\mathbb{RP}^2$ is not).
Another example is given by the lens spaces $L(5,1)$ and $L(5,2)$ have isomorphic homotopy groups but are not homotopy equivalent.
A: Let $X,Y$ be some topological spaces, say path connected to simplify, and $f \colon X \to Y$ a continuous map.
Then, we call $f$ a weak homotopy equivalence if the induced map $$ \pi_i (f) \colon \pi_i(X) \to \pi_i(Y)$$ is a group isomorphism for every $i\geq 1$ and a set-bijection for $i=0$.
It is easy to see that if $f$ is a homotopy equivalence, then it is a weak homotopy equivalence. The converse is not true, as already said in the previous answers. However, if $X$ and $Y$ are CW-complexes, then the converse holds : 

Theorem (Whitehead, 1949). A weak homotopy equivalence between CW-complexes is a homotopy equivalence.

(This is done in the article Combinatorial homotopy I by Whitehead in Bulletin of the American Mathematical Society, volume 55.)
