Check with a real estate lawyer familiar with the city or county the property is in. I'm not a lawyer, so this isn't legal advice. However, in many cases the answer is yes: If the tenant has a valid lease and isn't in violation of the lease, you are/may be obligated to obey the terms and conditions of the lease.
Having said that, if you really, really want to live in the unit and don't want to wait until the lease expires, you might be able to buy the tenant out of the remainder of his/her lease. Suppose the tenant has 6 months left on a lease, and is paying rent of $1,000 a month. You might offer $3,000...or $4,000...or $5,000...or $6,000 for the tenant to move in 30 days. It might be worth considering if, for instance, the condo was in a building where very few units became available and now this one did. Or it might be worth considering if you could purchase that unit for, say, at least $6,000 under what the comps are. Lots of different reasons why. The point is: Don't immediately cross a condo off your list just because it currently has a tenant in it.