A numerical investigation is made of the effects of compressibility on three-dimensional thermal convection in a basally heated, highly viscous fluid spherical shell with an inner to outer radius ratio of approximately 0.55, characteristic of the Earth's whole mantle. Compressibility is implemented with the anelastic approximation and a hydrostatic adiabatic reference state whose bulk modulus is a linear function of pressure. The compressibilities studied range from Boussinesq cases to compressibilities typical of the Earth's whole mantle. Compressibility has little effect on the spatial structure of steady convection when the superadiabatic temperature drop across the shell DELTA-T(sa) is comparable to a characteristic adiabatic temperature. When DELTA-T(sa) is approximately an order of magnitude smaller than the adiabatic temperature, compressibility is significant. For all the non-Boussinesq cases, the regular polyhedral convective patterns that exist at large DELTA-T(sa) break down at small DELTA-T(sa) into highly irregular patterns; as DELTA-T(sa) decreases convection becomes penetrative in the upper portion of the shell and is strongly time dependent at Rayleigh numbers only ten times the critical Rayleigh number, [Ra]cr. Viscous heating in the compressible solutions is concentrated around the upwelling plumes and is greatest near the top and bottom of the shell. Solutions with regular patterns (and large DELTA-T(sa)) remain steady up to fairly high Rayleigh numbers (100[Ra]cr), while solutions with irregular convective patterns are time dependent at similar Rayleigh numbers. Compressibility, affects the pattern evolution of the irregular solutions, producing fewer upwelling plumes with increasing compressibility.