diff --git a/IPython/__init__.py b/IPython/__init__.py index b8956fe..69750f2 100644 --- a/IPython/__init__.py +++ b/IPython/__init__.py @@ -28,8 +28,10 @@ import sys #----------------------------------------------------------------------------- # Don't forget to also update setup.py when this changes! -if sys.version_info[:2] < (2,7): - raise ImportError('IPython requires Python Version 2.7 or above.') +v = sys.version_info +if v[:2] < (2,7) or (v[0] >= 3 and v[:2] < (3,3)): + raise ImportError('IPython requires Python version 2.7 or 3.3 or above.') +del v # Make it easy to import extensions - they are always directly on pythonpath. # Therefore, non-IPython modules can be added to extensions directory. diff --git a/setup.py b/setup.py index 7ef9289..1336f42 100755 --- a/setup.py +++ b/setup.py @@ -26,8 +26,9 @@ import sys # This check is also made in IPython/__init__, don't forget to update both when # changing Python version requirements. -if sys.version_info[:2] < (2,7): - error = "ERROR: IPython requires Python Version 2.7 or above." +v = sys.version_info +if v[:2] < (2,7) or (v[0] >= 3 and v[:2] < (3,3)): + error = "ERROR: IPython requires Python version 2.7 or 3.3 or above." print(error, file=sys.stderr) sys.exit(1)