Is it possible that $\mathbb{P}^n$ is an algebraic vector bundle over some algebraic variety? This is an interesting question that my friend asked in a student seminar. I believe that the answer is NOT. Because the only global sections of $\mathcal{O}_{\mathbb{P}^n}$ are constants. However as a total space of vector bundles $E$ over $X$, the global sections are all in $\Gamma(X, \oplus Sym^n E)=\oplus \Gamma(X,Sym^n E)$ which may not be $\mathbb{C}$ in general. The trouble case is when $\Gamma(X, E)=0$? Am I correct? Is there any other explanation?

Edit: Thanks to everyone for your comments and answer. It seems that compactness is the correct way to follow.

However, I still wondering that why the argument on sections doesn't work. In other words, is there an example of a non-proper algebraic variety whose structure sheaf only has constant global sections.