diff --git a/setuptools/msvc.py b/setuptools/msvc.py index a3d350fe509..3991aff24db 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -629,7 +629,7 @@ def _find_latest_available_vs_ver(self): vc_vers = set(reg_vc_vers) vc_vers.update(self.known_vs_paths) - return sorted(vc_vers)[-1] + return max(vc_vers) def find_reg_vs_vers(self): """