One more thing to be considered is the ampere requirement for the compressor motor you get.
Motors up to 1hp can be connected to a 20 amp, 120 volt outlet as long there is no other load on the circuit.
Any motor above 1hp will need a dedicated circuit to power it.
The ampere load of a 2hp single phase motor connected to a 240 volt source is 12 amps at full load. 25% must be added to the 12 amps to determine wire size. #14 wire is rated at 15 amps under normal conditions.
A 3hp motor is 17 amps. #10 wire.
A 5hp motor is 28 amps. #8 wire.
A 71/2 hp motor is 40 amps. #6 wire.
The ampere load of your motor could vary from the above.
Also the capacity of your main service panel needs to checked to see if the motor load can added.