diff --git a/setup.py b/setup.py index cc2835902..8987b0cbf 100644 --- a/setup.py +++ b/setup.py @@ -2,9 +2,19 @@ """ ChatterBot setup file. """ +import sys +import platform from setuptools import setup +if sys.version_info[0] < 3: + raise Exception( + 'You are tying to install ChatterBot on Python version {}.\n' + 'Please install ChatterBot in Python 3 instead.'.format( + platform.python_version() + ) + ) + # Dynamically retrieve the version information from the chatterbot module CHATTERBOT = __import__('chatterbot') VERSION = CHATTERBOT.__version__