Can one heat up a vacuum? I've got a question about heating a vacuum.  If there were, say, a container in space, at 2.7 degrees kelvin (the typical temperature of space, if I'm not mistaken) and as empty as space (as close to a vacuum as space allows), how would one go about pressurizing and heating that container?  If a gas such as oxygen were introduced, would it freeze due to the temperature or would it sublimate due to the vacuum? If the former, I don't understand how heat could be introduced because heat needs a medium to heat.  If the latter, once the vacuum was overcome, and a sufficient pressure was acquired, wouldn't the oxygen freeze and re-create the vacuum?  Would both heat and pressure need to be introduced at the same time?
Thank you.
 A: "space" is at 2.7K because that's the temperature of the microwave background.
If you put an empty box in space the walls of it will eventually end up at 2.7K (in theory) and so anything inside it can only cool to that temperature. If anything was hotter it would radiate heat to the colder walls and if anything tried to get colder, the "hot" walls would heat it back upto 2.7K
(we can get colder than 2.7K in the lab by doing work to take the extra heat that leaks in, concentrating it, and pumping it into the warmer lab - just like your kitchen fridge manages to get below room temperature) 
If you put oxygen in the box it would radiate heat away until it reached that temperature (assuming the walls could themselves radiate away the extra heat to the rest of the universe). Depending on the size of the box and the amount of oxygen you would either have a very dilute gas of individual oxygen molecules or all the molecules would be stuck to the walls of the container. 
At low enough pressures it's a little pointless to talk about whether an individual oxygen molecule is a solid liquid or gas.
A: If you inject the gas very slowly, the system will remain in thermodynamic equilibrium

source
By looking at the diagram above, you can heat up the gas as you inject it and keep it on the bottom right of the quadrant, thus gaseous.
A: The short answer to the question "Can you heat up a vacuum?" is yes, but once you heat it up it's not strictly "vacuum". The notion of the vacuum that we use in modern quantum field theory refers to a region of space in which all of the quantum fields- electromagnetic fields, particle fields, gluon fields, etc.- are in their minimum energy states, or ground states.
Black-body radiation (otherwise known as radiative heat transfer) is a process by which an object of non-zero temperature equilibrates with the electromagnetic field. This type of heat transfer does not require an additional medium such as a gas or solid in the way that convective or conductive heat transfer does, so you are directly heating up the vacuum. Now, from a strict standpoint, once you transfer any heat into the vacuum, it is no longer in its lowest energy state and thus is no longer a vacuum, but this is pedantic from a practical perspective. Even the most empty regions of space are not at their lowest possible energy state- as you mentioned, space has a temperature of 2.7 K due to black-body radiation emitted by clouds of plasma when the universe was very young (if you're interested in this, look up the cosmic microwave background).
As far as the specific scenario with oxygen in a box, what happens is entirely dependent on the energy and number of moles of oxygen you use. If the oxygen is sufficiently hot when you dump it in, it will equilibrate with the box and either remain a gas or turn into a liquid or solid as appropriate. Over time, however, the box will equilibrate with the vacuum around it via radiative heat transfer, and the box and the oxygen inside it will reach 2.7 K.
