In the remaining case, in which the space has no isolated points, it's entirely possible that all compact sets have empty interior.

Let $(\mathbb P, \mathcal T)$ be the space of irrational numbers with the usual topology. Suppose that $K$ is a subset of $\mathbb P$ with non-empty interior; then there are rational numbers $p$ and $q$ such that $p < q$ and $(p,q) \cap \mathbb P \subseteq K$, where $(p,q)$ is the usual open interval in $\mathbb R$. Fix $r \in (p,q) \cap \mathbb Q$, choose $n \in \omega$ so that $2^{-n} < \min\{r-p,q-r\}$, and for $k>n$ let $F_k = [r-2^{-k},r+2^{-k}] \cap \mathbb P$, a clopen subset of $\mathbb P$. Clearly $\bigcap \limits_{k>n} [r-2^{-k},r+2^{-k}] = \{r\}$, so $\bigcap \limits_{k>n} F_k = \emptyset$. Thus, $K$ contains a nested family of non-empty closed sets with empty intersection and so cannot be compact. That is, every compact subset of $\mathbb P$ has empty interior.

On the other hand, $\mathbb P$ is a $G_\delta$ in the space of reals with the usual metric, which is complete, so $(\mathbb P, \mathcal T)$ is completely metrizable by some metric $d$, and $(\mathbb P, d)$ is then a complete, separable metric space without isolated points in which all compact sets have empty interior. (In fact $(\mathbb P, \mathcal T)$ can be characterized as the unique topologically complete, zero-dimensional, nowhere locally compact, separable metric space; this is a classic result of Alexandroff and Urysohn.)

On the other hand, every non-empty open set $U$ in a topologically complete, separable metric space without isolated points does contain a Cantor set. To see this, construct a tree of open sets $V_s \subseteq U$ indexed by finite sequences of zeroes and ones in such a way that for each index sequence $s$, $\text{cl } V_{s0} \cap \text{cl } V_{s1} = \emptyset$, $\text{cl } V_{s0} \cup \text{cl } V_{s1} \subseteq V_s$, and $\text{diam}(V_s) < 2^{-|s|}$, where the diameter is taken with respect to a complete metric on the space. For each infinite sequence $\sigma$ of zeroes and ones let $p_\sigma$ be the unique point in $\bigcap \{V_s:s \text{ is an initial segment of } \sigma\}$; completeness of the metric ensures the existence of each $p_\sigma$. Let $K = \{p_\sigma:\sigma \in 2^\omega\}$; the construction ensures that the map $h:2^\omega \to K:\sigma \mapsto p_\sigma$ is a homeomorphism and hence that $K$ is a Cantor set.

Thus, if $U$ is a non-empty open set in a complete, separable metric space, either $U$ contains a compact set with non-empty interior, or $U$ contains a Cantor set. That seems to be about the best that we can do in general by way of finding 'large' subsets of $U$.


Some observations:

  1. $X$ is finite, then it is trivially compact and every subset is compact.
  2. $X$ is discrete, then it has to be countable, and a subset is compact if and only if it is finite, and then we are in trouble.
  3. $X$ is non-discrete countable, then it is homeomorphic to some countable ordinal with the order topology, then every open set contains some interval which contains an isolated point which is compact.
    We cannot really hope for a lot more, since if the ordinal has infinitely many limit ordinals below it we can find a discrete infinite subset which is open, which reduces the case to the previous one (e.g. $\omega^\omega$ with the set $\{\omega^n+4\mid n<\omega\}$, then the set is a discrete and open subspace)
  4. $X$ is uncountable, then it has a perfect subspace and a countable scattered part. If $A$ intersects with the scattered part of $X$ then we reduce to one of the previous cases.

This means that we only really need to deal with the case where $X$ is perfect, which is indeed the hard case.