From 298173b75d42005b7026f715b0b27223cdac133b Mon Sep 17 00:00:00 2001 From: rob Date: Thu, 2 May 2019 16:18:23 -0600 Subject: [PATCH] catch when apsw isn't installed and auto-install it --- minus80/Freezable.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/minus80/Freezable.py b/minus80/Freezable.py index 687d6d3..53e681b 100644 --- a/minus80/Freezable.py +++ b/minus80/Freezable.py @@ -4,7 +4,6 @@ # Suppress the warning until the next wersion import bcolz as bcz -import apsw as lite import os as os import numpy as np import pandas as pd @@ -12,6 +11,14 @@ from .Config import cf from contextlib import contextmanager +try: + import apsw as lite +except ModuleNotFoundError as e: + from .Tools import install_apsw + install_apsw() + import apsw as lite + + __all__ = ['Freezable'] class sqlite_dict(object):