diff --git a/plotly/graph_objs/graph_objs_tools.py b/plotly/graph_objs/graph_objs_tools.py index 812b29e4764..a40e774866d 100644 --- a/plotly/graph_objs/graph_objs_tools.py +++ b/plotly/graph_objs/graph_objs_tools.py @@ -4,8 +4,16 @@ import os import sys if sys.version[:3] == '2.6': - from ordereddict import OrderedDict - import simplejson as json + try: + from ordereddict import OrderedDict + import simplejson as json + except ImportError: + raise ImportError( + "Looks like you're running Python 2.6. Plotly expects newer " + "standard library versions of ordereddict and json. You can " + "simply upgrade with these 'extras' with the following terminal " + "command:\npip install 'plotly[PY2.6]'" + ) else: from collections import OrderedDict import json diff --git a/plotly/version.py b/plotly/version.py index 4c2dc20a737..970bb6f45e7 100644 --- a/plotly/version.py +++ b/plotly/version.py @@ -1 +1 @@ -__version__ = '1.6.9' +__version__ = '1.6.10' diff --git a/setup.py b/setup.py index 4c9f4f884e3..f812d65be9d 100644 --- a/setup.py +++ b/setup.py @@ -41,9 +41,6 @@ def readme(): 'plotly/matplotlylib/mplexporter', 'plotly/matplotlylib/mplexporter/renderers'], package_data={'plotly': ['graph_reference/*.json', 'widgets/*.js']}, - install_requires=['requests', - 'six', - 'pytz', - 'ordereddict', - 'simplejson'], + install_requires=['requests', 'six', 'pytz'], + extras_require={"PY2.6": ['simplejson', 'ordereddict']}, zip_safe=False)