diff --git a/setup.py b/setup.py index ed3cbf2..7920744 100755 --- a/setup.py +++ b/setup.py @@ -1,13 +1,16 @@ #!/usr/bin/env python from setuptools import setup, find_packages -import pip +import pkg_resources import sys import os -if int(pip.__version__.split('.')[0]) < 6: - print('pip older than 6.0 not supported, please upgrade pip with:\n\n' - ' pip install -U pip') - sys.exit(-1) +try: + if int(pkg_resources.get_distribution("pip").version.split('.')[0]) < 6: + print('pip older than 6.0 not supported, please upgrade pip with:\n\n' + ' pip install -U pip') + sys.exit(-1) +except pkg_resources.DistributionNotFound: + pass if os.environ.get('CONVERT_README'): import pypandoc