Skip to content

Commit ce0adcc

Browse files
committed
Merge pull request #199 from plotly/fix-anaconda-simplejson-issue
Fix anaconda simplejson issue
2 parents 4a19ce2 + 0b6d38e commit ce0adcc

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

Diff for: plotly/graph_objs/graph_objs_tools.py

+10-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,16 @@
44
import os
55
import sys
66
if sys.version[:3] == '2.6':
7-
from ordereddict import OrderedDict
8-
import simplejson as json
7+
try:
8+
from ordereddict import OrderedDict
9+
import simplejson as json
10+
except ImportError:
11+
raise ImportError(
12+
"Looks like you're running Python 2.6. Plotly expects newer "
13+
"standard library versions of ordereddict and json. You can "
14+
"simply upgrade with these 'extras' with the following terminal "
15+
"command:\npip install 'plotly[PY2.6]'"
16+
)
917
else:
1018
from collections import OrderedDict
1119
import json

Diff for: plotly/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '1.6.9'
1+
__version__ = '1.6.10'

Diff for: setup.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@ def readme():
4141
'plotly/matplotlylib/mplexporter',
4242
'plotly/matplotlylib/mplexporter/renderers'],
4343
package_data={'plotly': ['graph_reference/*.json', 'widgets/*.js']},
44-
install_requires=['requests',
45-
'six',
46-
'pytz',
47-
'ordereddict',
48-
'simplejson'],
44+
install_requires=['requests', 'six', 'pytz'],
45+
extras_require={"PY2.6": ['simplejson', 'ordereddict']},
4946
zip_safe=False)

0 commit comments

Comments
 (0)