Let $\mathbb{X}$ be a (real or complex) Banach Space and let $\mathbb{B}(\mathbb{X})$ be the space of all bounded linear operators of $\mathbb{X}$.
Let $\tau_u$ be the Uniform Topology on $\mathbb{B}(\mathbb{X})$ induced by the norm on $\mathbb{B}(\mathbb{X})$and let $\tau_{SOT}$ be the Strong Operator Topology on $\mathbb{B}(\mathbb{X})$.
When is $\mathbb{B}(\mathbb{X})$ compact with respect to $\tau_u$ ($\tau_{SOT}$) ?
It works if and only if $\mathbb{X}$ is the trivial vector space, $\left\{ 0\right\}$.
I. Suppose $\mathbb{X}=\left\{ 0\right\}$. Then, letting $L\in\mathbb{B}\left(\mathbb{X}\right)$, we know that the operator norm of $L$, denoted $\left\Vert L\right\Vert$, is given by:$$\left\Vert L\right\Vert =\sup_{x\in\mathbb{X};\left\Vert x\right\Vert _{\mathbb{X}}\leq1}\left\Vert L\left(x\right)\right\Vert _{\mathbb{X}}$$ where $\left\Vert \cdot\right\Vert _{\mathbb{X}}$ is the norm on $\mathbb{X}$. Since the only element of $\mathbb{X}$ is $0$, we have that:
$$\left\Vert L\right\Vert =\sup_{x\in\mathbb{X};\left\Vert x\right\Vert _{\mathbb{X}}\leq1}\left\Vert L\left(x\right)\right\Vert _{\mathbb{X}}=\left\Vert L\left(0\right)\right\Vert _{\mathbb{X}}=\left\Vert 0\right\Vert _{\mathbb{X}}=0$$ since, by definition, any normed vector space must give the zero vector a norm of zero. Since $\mathbb{B}\left(\mathbb{X}\right)$ is a normed vector space, $L$ having zero operator norm forces $L$ to be the zero operator (the zero vector in $\mathbb{B}\left(\mathbb{X}\right)$). Consequently, as Banach spaces, $\mathbb{B}\left(\mathbb{X}\right)$ is isomorphic to $\left\{ 0\right\}$ (and hence, to $\mathbb{X}$) whenever $\mathbb{X}=\left\{ 0\right\}$ , which shows that $\mathbb{B}\left(\left\{ 0\right\} \right)$ is indeed compact whenever $\mathbb{X}=\left\{ 0\right\}$.
II. For the other direction, suppose that $\mathbb{X}\neq\left\{ 0\right\}$. Then, the identity map $\textrm{Id}_{\mathbb{X}}$ (which is most definitely an element of $\mathbb{B}\left(\mathbb{X}\right)$) is not the same thing as the zero map on $\mathbb{X}$. Hence, $\mathbb{B}\left(\mathbb{X}\right)$ is a vector space with a non-zero element ($\textrm{Id}_{\mathbb{X}}$). Noting that $\left\Vert \textrm{Id}_{\mathbb{X}}\right\Vert =1$ the homogeneity property of vector space norms then guarantees that $n\textrm{Id}_{\mathbb{X}}$ (the sum of $\textrm{Id}_{\mathbb{X}}$ with itself $n$ times, where $n$ is an integer—necessarily an element of the vector space $\mathbb{B}\left(\mathbb{X}\right)$) is an element of $\mathbb{B}\left(\mathbb{X}\right)$ with norm:$$\left\Vert n\textrm{Id}_{\mathbb{X}}\right\Vert =n$$ Consequently, for all integers $m$ and $n$:$$\left\Vert n\textrm{Id}_{\mathbb{X}}-m\textrm{Id}_{\mathbb{X}}\right\Vert =n-m$$ As such, $\left\{ n\textrm{Id}_{\mathbb{X}}\right\} _{n\in\mathbb{Z}}$ is an infinite subset of $\mathbb{B}\left(\mathbb{X}\right)$ that contains no convergent sequence. Consequently, $\mathbb{B}\left(\mathbb{X}\right)$ cannot be compact. Thus, $\mathbb{B}\left(\mathbb{X}\right)$ is never compact whenever $\mathbb{X}\neq\left\{ 0\right\}$.
Q.E.D.