If you want to describe tangent bundles, the appropriate language is classifying spaces.
A vector bundle $\mathbb R^k \to E \to B$ over a space $B$ is described by a homotopy-class of map
$$B \to Gr_{\infty,k}$$
where $Gr_{\infty,k}$ is the space of all $k$-dimensional vector subspaces of $\oplus_\infty \mathbb R$.
So for example, the tangent bundle of $S^2$ is a $2$-dimensional vector bundle over $S^2$, so described by a map
$$S^2 \to Gr_{\infty,2}$$
$Gr_{\infty,2}$ as a space would be called $B(O_2)$, the classifying space of the Lie group $O_2$, meaning that it is the quotient of a contractible space by a free action of $O_2$ (think of the associated Stiefel space). So an element of $\pi_2 Gr_{\infty,2}$ is equivalent (via the homotopy long exact sequence) to an element of $\pi_1 O_2$, which is isomorphic to $\mathbb Z$.
i.e. 2-dimensional vector bundles over $S^2$ are described by an integer.
There's another way to see the above construction. Decompose $S^2$ into the union of two discs, the upper and lower hemisphere. Via pull-backs this decomposes $TS^2$ into (up to an isomorphism) $D_u \times \mathbb R^2$ and $D_l \times \mathbb R^2$ where $D_u$ and $D_l$ are the upper and lower hemi-spheres respectively. $\partial D_u = \partial D_l = S^1$. So there's a gluing map construction
$$ TS^2 = (D_u \times \mathbb R^2) \cup (D_l \times \mathbb R^2) $$
There's is a map describing how point on $\partial D_l \times \mathbb R^2$ have to be glued to points on $\partial D_u \times \mathbb R^2$ and it has the form
$$(z,v) \longmapsto (z,f_z(v))$$
where
$$f : S^1 \to O_2$$
The homotopy-class of this map is again described by an integer. These are the same two integers. A fun calculation shows you it's two, the Euler characteristic.
The above story is worked-out in more detail in Steenrod's book on fibre bundles. Also Milnor and Stasheff.
By-the-way, many people have trouble initially thinking about tangent bundles. They're fairly delicate objects.
Every complex manifold is orientable, as every complex vector space as a canonical orientation as a real space. Namely if $V$, is a complex vector space, and $B= (u_1,...,u_n)$ is a base (over C), then $B^*=(u_1,...,u_n, iu_1,...iu_n)$ is a base over $\bf R$. Note that if $B'$ is another base over $C$ and $l$ the unique linear map $C$ map such that $lB=B'$, $lB^*=B'^*$, and the determinant of $l$, viwed as a $R$ linear map is the squre of the modulus of the determinant of $l$, hence positive. Thus the orientation given by $B$ is the same than that given by $B'$, and complex linear maps preserves this orientation.
Best Answer
A manifold is called parallelisable if it has trivial tangent bundle. So your question is for which positive integers $m$ is $\mathbb{RP}^m$ parallelisable? What about $\mathbb{CP}^m$?
If $T\mathbb{RP}^m$ is trivial, then the total Stiefel-Whitney class $w(T\mathbb{RP}^m)$ is $1$. By Corollary $4.6$ of Milnor & Stasheff's Characteristic Classes, $w(T\mathbb{RP}^m) = 1$ if and only if $m + 1$ is a power of $2$. So the only real projective spaces which can possibly be parallelisable are $\mathbb{RP}^1$, $\mathbb{RP}^3, \mathbb{RP}^7, \mathbb{RP}^{15}, \mathbb{RP}^{31}, \dots$ We still need to determine which of these are actually parallelisable (the condition on the total Stiefel-Whitney class is a necessary condition, but not sufficient as the case of spheres demonstrates).
Theorem $4.7$ of the same book states that if $\mathbb{R}^n$ admits a bilinear map $p : \mathbb{R}^n\times \mathbb{R}^n \to \mathbb{R}^n$ without zero divisors, then $\mathbb{RP}^{n-1}$ is parallelisable. By identifying $\mathbb{R}^2$ with $\mathbb{C}$, we obtain such a bilinear map for $n = 2$ given by the usual multiplication of complex numbers, i.e. $p((a, b),(c, d)) = (ac - bd, ac + bd)$. Similarly, by identifying $\mathbb{R}^4$ with the quaternions $\mathbb{H}$ and $\mathbb{R}^8$ with the octionions $\mathbb{O}$, we obtain such a map for $n = 4$ and $n = 8$. Therefore, $\mathbb{RP}^1$, $\mathbb{RP}^3$ and $\mathbb{RP}^7$ are parallelisable.
What about $\mathbb{RP}^{15}$, $\mathbb{RP}^{31}, \dots$? None of the remaining real projective spaces are parallelisable - this is harder to show. It follows from Kervaire's $1958$ paper Non-parallelizability of the $n$-sphere for $n > 7$.
So, the positive integers $m$ for which $\mathbb{RP}^m$ is parallelisable are $m = 1, 3,$ and $7$.
The parallelisability of $\mathbb{CP}^m$ is much easier to determine: $\mathbb{CP}^m$ is not parallelisable for any positive integer $m$.
As $\mathbb{CP}^m$ is a complex manifold, its tangent bundle is a complex vector bundle and hence has a total Chern class. The total Chern class of $\mathbb{CP}^m$ is $c(T\mathbb{CP}^m) = (1 + a)^{m+1} \in H^*(\mathbb{CP}^m, \mathbb{Z})$. If $T\mathbb{CP}^m$ were trivial, then it would have total Chern class $1$ but this is never the case. More explicitly,
$$c_1(T\mathbb{CP}^m) = (m+1)a \in H^2(\mathbb{CP}^m, \mathbb{Z}) \cong \mathbb{Z}.$$
As $a \neq 0$ and $m \neq -1$, $c_1(T\mathbb{CP}^m) = (m + 1)a \neq 0$.
More generally, any oriented closed manifold which is parallelisable must have Euler characteristic zero. In fact, such an oriented closed manifold which admits a nowhere zero vector field has Euler characteristic zero, see Property $9.7$ of the aforementioned book. The claim then follows from the fact that $\chi(\mathbb{CP}^m) = m + 1 \neq 0$.