Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4cb6b8a

Browse files
committed
Improve our error messages for non compatibility.
1 parent c4ef808 commit 4cb6b8a

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

IPython/__init__.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@
2929
#-----------------------------------------------------------------------------
3030

3131
# Don't forget to also update setup.py when this changes!
32-
v = sys.version_info
33-
if v[:2] < (3,3):
34-
raise ImportError('IPython requires Python version 3.3 or above.')
35-
del v
32+
if sys.version_info < (3,3):
33+
raise ImportError('IPython 6.0+ requires Python version 3.3 or above. '
34+
'For a version compatible with Python 2.7, please install'
35+
' the 5.x Long Term Support version.')
3636

3737
# Make it easy to import extensions - they are always directly on pythonpath.
3838
# Therefore, non-IPython modules can be added to extensions directory.
@@ -143,4 +143,3 @@ def start_kernel(argv=None, **kwargs):
143143
"""
144144
from IPython.kernel.zmq.kernelapp import launch_new_instance
145145
return launch_new_instance(argv=argv, **kwargs)
146-

0 commit comments

Comments
 (0)