From 801f3cd6c6a06b21682d3d708d3ee75f081e3ddc Mon Sep 17 00:00:00 2001 From: 19thyneb Date: Sat, 10 Apr 2021 17:37:41 -0700 Subject: [PATCH] Removed psycopg2 from Lux requirements Aiming to simplify the initial Lux installation. Will include a notice in the SQL documentation letting users know that they will have to install the library themselves if the want to use the LuxSQLTable functionality. --- lux/_config/config.py | 8 -------- requirements-dev.txt | 3 +++ requirements.txt | 3 --- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/lux/_config/config.py b/lux/_config/config.py index 89c9a941..59dd0ae5 100644 --- a/lux/_config/config.py +++ b/lux/_config/config.py @@ -348,14 +348,6 @@ def set_SQL_connection(self, connection): def set_executor_type(self, exe): if exe == "SQL": - import pkgutil - - if pkgutil.find_loader("psycopg2") is None: - raise ImportError( - "psycopg2 is not installed. Run `pip install psycopg2' to install psycopg2 to enable the Postgres connection." - ) - else: - import psycopg2 from lux.executor.SQLExecutor import SQLExecutor self.executor = SQLExecutor() diff --git a/requirements-dev.txt b/requirements-dev.txt index 4e0e654d..0f2316be 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -4,3 +4,6 @@ Sphinx>=3.0.2 sphinx-rtd-theme>=0.4.3 xlrd black +# Install to use SQLExecutor +psycopg2>=2.8.5 +psycopg2-binary>=2.8.5 diff --git a/requirements.txt b/requirements.txt index 4994f30e..0beb7050 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,9 +4,6 @@ numpy>=1.16.5 pandas>=1.2.0 scikit-learn>=0.22 matplotlib>=3.0.0 -# Install only to use SQLExecutor -psycopg2>=2.8.5 -psycopg2-binary>=2.8.5 lux-widget>=0.1.4 us iso3166 \ No newline at end of file