Do you need a gym to exercise?
The short answer to that question is, no.
Going to a gym is nice because there is a large variety of equipment, lots of classes, social interaction and because misery loves company.
But, all that equipment may be sweat-stained by that dude that doesn’t know how to wipe things down. And, to be honest, you will not use most of the pieces of equipment anyway.
Sometimes people suck and having to be around them when you exercise just makes the whole experience worse.