According to your usage, I don't actually see *any* UserID given. (Which should actually give you "invalid user ID specified".)
My guess is you mis-typed the UserID. E.g., you did something like
pgp --gen-key Bob bob@localhost --key-type rsa ...
Try putting the entire UserID string in quotes, as in
pgp --gen-key "Bob <bob@localhost>" --key-type rsa ...
Regards,