Use try-except when importing the GPIO modules.