If you have any valid US Visa (or) Canadian (or) Japan (or) Schengen (or) European visa (or) Australian passport holder. You don’t need Mexican visa.
Else better to get Mexican visa by visiting mexican embassy near by to you – before your arrival.