From b9616419e1395745ce59288d01e591d72f80f0c8 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Fri, 27 Oct 2017 01:18:05 +0000 Subject: [PATCH] Add try/except around bz2 import --- spacy/cli/model.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/spacy/cli/model.py b/spacy/cli/model.py index 14e75647e..bcc1626bc 100644 --- a/spacy/cli/model.py +++ b/spacy/cli/model.py @@ -1,8 +1,11 @@ # coding: utf8 from __future__ import unicode_literals -import bz2 -import gzip +try: + import bz2 + import gzip +except ImportError: + pass import math from ast import literal_eval from pathlib import Path