From 4f1a7824357ab58d868dbd675af9b152fc3694e9 Mon Sep 17 00:00:00 2001 From: Ryan Snyder Date: Fri, 6 Jul 2018 21:15:02 -0400 Subject: Python: More useful error when loading too-old Python on Windows --- python/downloadprovider.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'python') diff --git a/python/downloadprovider.py b/python/downloadprovider.py index c0cecbe5..d34ca358 100644 --- a/python/downloadprovider.py +++ b/python/downloadprovider.py @@ -258,9 +258,12 @@ else: PythonDownloadProvider().register() except ImportError: - log.log_error("On this version of Python, the pip requests[security] package is required for network connectivity!") - log.log_error("On an Ubuntu 14.04 install, the following three commands are sufficient to enable networking for the current user:") - log.log_error(" sudo apt install python-pip") - log.log_error(" python -m pip install pip --upgrade --user") - log.log_error(" python -m pip install requests[security] --upgrade --user") + if sys.platform == "win32": + log.log_error("Provided Python version is too old! Only Python 2.7.10 and above are known to work on Windows!") + else: + log.log_error("On Python versions below 2.7.9, the pip requests[security] package is required for network connectivity!") + log.log_error("On an Ubuntu 14.04 install, the following three commands are sufficient to enable networking for the current user:") + log.log_error(" sudo apt install python-pip") + log.log_error(" python -m pip install pip --upgrade --user") + log.log_error(" python -m pip install requests[security] --upgrade --user") -- cgit v1.3.1