The present invention relates to compounds useful as inhibitors of protein kinases. The invention also provides processes for preparing the compounds, pharmaceutically acceptable compositions comprising the compounds, and methods of using the compounds and compositions in the treatment of various disease, conditions, or disorders.