Necessary conditions for the existence of perfect Lee codes