diff --git a/setup.py b/setup.py index 2ceb9bfbb..7be26c413 100644 --- a/setup.py +++ b/setup.py @@ -193,7 +193,6 @@ def setup_package(): 'thinc>=5.0.0,<5.1.0', 'plac', 'six', - 'ujson', 'cloudpickle', 'sputnik>=0.9.2,<0.10.0'], classifiers=[ diff --git a/spacy/gold.pyx b/spacy/gold.pyx index 67716b0ab..12c18b1c4 100644 --- a/spacy/gold.pyx +++ b/spacy/gold.pyx @@ -1,7 +1,6 @@ import numpy import io import json -import ujson import random import re import os diff --git a/spacy/strings.pyx b/spacy/strings.pyx index c890cdd22..2e81bd87b 100644 --- a/spacy/strings.pyx +++ b/spacy/strings.pyx @@ -10,7 +10,10 @@ from preshed.maps cimport map_iter, key_t from .typedefs cimport hash_t -import ujson as json +try: + import ujson as json +except ImportError: + import json cpdef hash_t hash_string(unicode string) except 0: