Problem with a commutative diagram

You need three columns. But also to vertically align \pi and \pi'.

With \setheight{x}{y} we typeset x, but as if its vertical dimensions were those of y.

\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz-cd}

\newcommand{\setheight}[2]{\smash{#1}\vphantom{#2}}

\begin{document}

\begin{tikzcd}[column sep=small]
E \arrow[rd, "\pi"'] \arrow[rr, "u"] &   & E' \arrow[ld, "\setheight{\pi'}{\pi}"] \\
& X
\end{tikzcd}

\end{document}

enter image description here


\documentclass{article}
\usepackage{tikz-cd}
\begin{document}
\[
  \begin{tikzcd}
     E \arrow[rr,"u"] \arrow[dr,"\pi"'] 
    & & {E'}\arrow[dl,"\pi'"]\\
    & X & \\
  \end{tikzcd}
\]
\end{document}

enter image description here


enter image description here

\documentclass{article}
\usepackage{tikz-cd}

\begin{document}
\[
  \begin{tikzcd}[row sep=huge]
E \ar[rr,"u"] \ar[dr,"\pi" '] 
    &   &   E'\ar[dl, "\pi'"]  \\ 
    & x &    
  \end{tikzcd}
\]
\end{document}

or

enter image description here

\documentclass{article}
\usepackage{tikz-cd}

\begin{document}
\[
  \begin{tikzcd}[row sep=huge]
E \ar[rr,"u"] \ar[dr, "\pi", sloped]
    &   &   E'\ar[dl, "\pi'",sloped]  \\
    & x &
  \end{tikzcd}
\]
\end{document}