20-Year Prospect
Driving a taxi seems like one of those occupations that'll always be with us, but all isn't so sure in the livery world. There are plenty of factors both inside and outside of taxis that will affect the cab industry over the coming years.
The greatest threat facing taxi services are private ridesharing services like Uber and Lyft. These companies aren't licensed by cities in the same way taxis are, and so aren't burdened by the same regulations and fees that hit taxi drivers.
Anyone with a car and a clean background can work part time as a privately-hired chauffeur. The skyrocketing popularity of these companies means that taxis have to change their model to compete—or go out of business in the process.
Meanwhile, in an effort to reduce their carbon footprints, more people are relying on public transportation to get around. That may also be why more and more taxis on the roads are hybrids.
There may even come a day when taxis no longer need drivers to get you where you're going (source). If you're still a taxi driver when robots take over, you'll probably have to hop in back of one of those robot-cabs and head to the unemployment office...but that's probably a bit more than twenty years off.