diff --git a/synapse/__init__.py b/synapse/__init__.py index d5ef466a1f0a..cda8a6cec4b3 100644 --- a/synapse/__init__.py +++ b/synapse/__init__.py @@ -21,8 +21,6 @@ import os import sys -from canonicaljson import set_json_library - # Check that we're not running on an unsupported Python version. if sys.version_info < (3, 5): print("Synapse requires Python 3.5 or above.") @@ -40,7 +38,12 @@ pass # Use the standard library json implementation instead of simplejson. -set_json_library(json) +try: + from canonicaljson import set_json_library + + set_json_library(json) +except ImportError: + pass __version__ = "1.17.0"