8000 Correct version check in __init__ · matplotlib/matplotlib@fa6c625 · GitHub
[go: up one dir, main page]

Skip to content

Commit fa6c625

Browse files
committed
Correct version check in __init__
1 parent 020b08f commit fa6c625

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/matplotlib/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,10 +197,11 @@ def _forward_ilshift(self, other):
197197

198198

199199
major, minor1, minor2, s, tmp = sys.version_info
200-
_python26 = (major == 2 and minor1 >= 6) or major >= 3
200+
_python27 = (major == 2 and minor1 >= 7)
201+
_python34 = (major == 3 and minor1 >= 4)
201202

202-
if not _python26:
203-
raise ImportError('matplotlib requires Python 2.6 or later')
203+
if not _python27 or _python34:
204+
raise ImportError('matplotlib requires Python 2.7 or 3.4 or later')
204205

205206

206207
if not compare_versions(numpy.__version__, __version__numpy__):

0 commit comments

Comments
 (0)
0