diff --git a/skimage/io/manage_plugins.py b/skimage/io/manage_plugins.py index 62b3fc1c..326502c5 100644 --- a/skimage/io/manage_plugins.py +++ b/skimage/io/manage_plugins.py @@ -15,10 +15,11 @@ can be multiple states for a given plugin: loaded explicitly by the user. """ +import sys -try: +if sys.version.startswith('3'): from configparser import ConfigParser # Python 3 -except ImportError: +else: from ConfigParser import ConfigParser # Python 2 import os.path