Improved handling for specifying Python versions.