Topological map induced from group homomorphism of fundamental group The fundamental group operation can be considered as a functor $\pi_1:\textbf{Top}\to\textbf{Group}$.
Meanwhile, we know that for any group $G$, there exists a topological space (CW complex) such that $\pi_1(X_G)=G$. My question is: Given a group homomorphism $\varphi:G\to H$, is there always exists a continuous map of CW complexes $f_\varphi:X_G\to X_H$?
I tried to look at Hatcher, but seems nothing like this was mentioned. Thanks in advance in answering.
 A: This is not true for general $Y$ with $\pi_1(Y)=H$. The obstruction class is in $H^3(X,\pi_2Y)$.***
To say a bit more, given a homomorphism $\rho:G \to H$,  (after contracting $1$-skeletons) define maps $f_1:X^{(1)} \to Y$ by mapping generators for the fundamental group to generators. Since we have a group homomorphism, relations are satisfied, and in $X,Y$ such relations are $2$-cells, and so there is no problem extending this to a cellular map $f_2:X^{(2)} \to Y$.
After this, however, we are out of such luck. If $X$ is the presentation complex for $G$, then this is fine, but otherwise we have an obstruction cocycle that lives in $H^3(X,\pi_2 Y)$.
As mentioned before, when $Y=K(G,1)$, we know that $\pi_2(Y)=0$ and terefore such an obstruction doesn't exist, so we can extend to $X^{(3)}$, and to extend further we have another class in $H^4(X,\pi_3(Y))$, and so on, but $\pi_i(Y)=0$ for all $i>1$, and thus all of these obstructions vanish. As mentioned in the comments, this can be proven without this language (although basically the same idea) in Hatcher 1B.9.
A concrete counter-example would be finding a continuous map $f:\mathbb RP^3 \to \mathbb RP^2$ inducing the identity on $\mathbb Z/2$. One shows that this is impossible (without obstruction theory) by using the cup product on cohomology (see the proof of the Borsuk Ulam theorem here.
This news is not so bad, since the assignment $G \to K(G,1)$ can be made functorial, and in this case, we can always realize group homomorphisms as continuous maps between some choice of spaces.

***We should assume here that $Y$ is a simple space to make this more faimiliar, but we can in fact have an equivalent formulation by using local coefficients for cohomology.
