use Importerror to determine if we can use create_key_pair or not