It's normally a leak somewhere.
The fact that it worked for a couple of weeks tells you that the system is capable of working, but if it has no gas (ie no refrigerant) then it's just going to be compressing air, and unfortunately, that doesn't work.
The leak could be anywhere ... sometimes in the condenser (looks like a radiator) and sometimes it leaks from the seal of the compressor shaft. A second hand compressor might work, but the seal may be leaky on that one?