From bee3be48ad555e1541b0426f3e0a920924b97700 Mon Sep 17 00:00:00 2001 From: Donald Stufft Date: Sat, 22 Aug 2015 17:50:22 -0400 Subject: [PATCH] Handle the case where pip isn't installed during the version check --- pip/utils/outdated.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pip/utils/outdated.py b/pip/utils/outdated.py index 5549b7865..6365c6c06 100644 --- a/pip/utils/outdated.py +++ b/pip/utils/outdated.py @@ -99,7 +99,11 @@ def pip_version_check(session): the active virtualenv or in the user's USER_CACHE_DIR keyed off the prefix of the pip script path. """ - pip_version = packaging_version.parse(get_installed_version('pip')) + installed_version = get_installed_version("pip") + if installed_version is None: + return + + pip_version = packaging_version.parse(installed_version) pypi_version = None try: