3. If $\left(x^{2}-x-2\right)^{3}=a_{0}+a_{1} x+\cdots+a_{6} x^{6}$, then $a_{1}+a_{3}+a_{5}=$
3. -4 .

Let $x=0, x=1$, we get
$$
\begin{array}{l}
a_{0}=-8, \\
a_{0}+a_{1}+\cdots+a_{6}=\left(1^{2}-1-2\right)^{3}=-8 .
\end{array}
$$

Thus, $a_{1}+a_{2}+\cdots+a_{6}=0$.
Let $x=-1$, we get
$$
\begin{array}{l}
a_{0}-a_{1}+a_{2}-a_{3}+a_{4}-a_{5}+a_{6} \\
=\left[(-1)^{2}-(-1)-2\right]^{3}=0 .
\end{array}
$$

Thus, $-a_{1}+a_{2}-a_{3}+a_{4}-a_{5}+a_{6}=8$.
Therefore, $a_{1}+a_{3}+a_{5}=-4$.