IBM-Cloud / sql-query-clients

Client samples for IBM Cloud SQL Query service
Apache License 2.0
12 stars 24 forks source link

sql query triggers dependency error in watson studio #133

Open powellquiring opened 2 years ago

powellquiring commented 2 years ago

Describe the bug

To Reproduce Follow along with: https://dataplatform.cloud.ibm.com/analytics/notebooks/v2/440b3665-367f-4fc9-86d8-4fe7eae13b18/view?access_token=3c1471a6970890fe28cadf118215df44e82c2472a83c4051e3ff80fe505448ed

This cell:

!pip install --user --upgrade ibmcloudsql

resulted in warning and error:

Collecting ibmcloudsql
  Downloading ibmcloudsql-0.5.7.tar.gz (54 kB)
     |████████████████████████████████| 54 kB 4.4 MB/s  eta 0:00:01
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Requirement already satisfied: python-dateutil in /opt/conda/envs/Python-3.9/lib/python3.9/site-packages (from ibmcloudsql) (2.8.2)
Requirement already satisfied: ibm-cos-sdk-core>=2.10.0 in /opt/conda/envs/Python-3.9/lib/python3.9/site-packages (from ibmcloudsql) (2.11.0)
Requirement already satisfied: packaging in /opt/conda/envs/Python-3.9/lib/python3.9/site-packages (from ibmcloudsql) (21.3)
Collecting backoff==1.10.0
  Downloading backoff-1.10.0-py2.py3-none-any.whl (31 kB)
Collecting deprecated
  Downloading Deprecated-1.2.13-py2.py3-none-any.whl (9.6 kB)
Collecting isodate
  Downloading isodate-0.6.1-py2.py3-none-any.whl (41 kB)
     |████████████████████████████████| 41 kB 905 kB/s  eta 0:00:01
Collecting pre-commit
  Downloading pre_commit-2.20.0-py2.py3-none-any.whl (199 kB)
     |████████████████████████████████| 199 kB 29.4 MB/s eta 0:00:01
Requirement already satisfied: pyarrow in /opt/conda/envs/Python-3.9/lib/python3.9/site-packages (from ibmcloudsql) (5.0.0)
Requirement already satisfied: pandas>=1.1.0 in /opt/conda/envs/Python-3.9/lib/python3.9/site-packages (from ibmcloudsql) (1.3.4)
Requirement already satisfied: typing-extensions in /opt/conda/envs/Python-3.9/lib/python3.9/site-packages (from ibmcloudsql) (3.7.4.3)
Requirement already satisfied: importlib-metadata in /opt/conda/envs/Python-3.9/lib/python3.9/site-packages (from ibmcloudsql) (4.8.2)
Requirement already satisfied: sqlparse>=0.4.2 in /opt/conda/envs/Python-3.9/lib/python3.9/site-packages (from ibmcloudsql) (0.4.2)
Collecting numpy>=1.22.2
  Downloading numpy-1.23.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.1 MB)
     |████████████████████████████████| 17.1 MB 30.9 MB/s eta 0:00:01
Requirement already satisfied: requests>=2.2.0 in /opt/conda/envs/Python-3.9/lib/python3.9/site-packages (from ibmcloudsql) (2.26.0)
Requirement already satisfied: ibm-cos-sdk>=2.10.0 in /opt/conda/envs/Python-3.9/lib/python3.9/site-packages (from ibmcloudsql) (2.11.0)
Requirement already satisfied: ibm-cos-sdk-s3transfer==2.11.0 in /opt/conda/envs/Python-3.9/lib/python3.9/site-packages (from ibm-cos-sdk>=2.10.0->ibmcloudsql) (2.11.0)
Requirement already satisfied: jmespath<1.0.0,>=0.7.1 in /opt/conda/envs/Python-3.9/lib/python3.9/site-packages (from ibm-cos-sdk>=2.10.0->ibmcloudsql) (0.10.0)
Requirement already satisfied: urllib3<1.27,>=1.26.7 in /opt/conda/envs/Python-3.9/lib/python3.9/site-packages (from ibm-cos-sdk-core>=2.10.0->ibmcloudsql) (1.26.7)
Requirement already satisfied: pytz>=2017.3 in /opt/conda/envs/Python-3.9/lib/python3.9/site-packages (from pandas>=1.1.0->ibmcloudsql) (2021.3)
Requirement already satisfied: six>=1.5 in /opt/conda/envs/Python-3.9/lib/python3.9/site-packages (from python-dateutil->ibmcloudsql) (1.15.0)
Requirement already satisfied: certifi>=2017.4.17 in /opt/conda/envs/Python-3.9/lib/python3.9/site-packages (from requests>=2.2.0->ibmcloudsql) (2022.6.15)
Requirement already satisfied: idna<4,>=2.5 in /opt/conda/envs/Python-3.9/lib/python3.9/site-packages (from requests>=2.2.0->ibmcloudsql) (3.3)
Requirement already satisfied: charset-normalizer~=2.0.0 in /opt/conda/envs/Python-3.9/lib/python3.9/site-packages (from requests>=2.2.0->ibmcloudsql) (2.0.4)
Requirement already satisfied: wrapt<2,>=1.10 in /opt/conda/envs/Python-3.9/lib/python3.9/site-packages (from deprecated->ibmcloudsql) (1.12.1)
Requirement already satisfied: zipp>=0.5 in /opt/conda/envs/Python-3.9/lib/python3.9/site-packages (from importlib-metadata->ibmcloudsql) (3.6.0)
Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /opt/conda/envs/Python-3.9/lib/python3.9/site-packages (from packaging->ibmcloudsql) (3.0.4)
Collecting identify>=1.0.0
  Downloading identify-2.5.1-py2.py3-none-any.whl (98 kB)
     |████████████████████████████████| 98 kB 11.2 MB/s eta 0:00:01
Collecting nodeenv>=0.11.1
  Downloading nodeenv-1.7.0-py2.py3-none-any.whl (21 kB)
Collecting virtualenv>=20.0.8
  Downloading virtualenv-20.15.1-py2.py3-none-any.whl (10.1 MB)
     |████████████████████████████████| 10.1 MB 34.6 MB/s eta 0:00:01
Collecting cfgv>=2.0.0
  Downloading cfgv-3.3.1-py2.py3-none-any.whl (7.3 kB)
Requirement already satisfied: pyyaml>=5.1 in /opt/conda/envs/Python-3.9/lib/python3.9/site-packages (from pre-commit->ibmcloudsql) (5.4.1)
Requirement already satisfied: toml in /opt/conda/envs/Python-3.9/lib/python3.9/site-packages (from pre-commit->ibmcloudsql) (0.10.2)
Requirement already satisfied: setuptools in /opt/conda/envs/Python-3.9/lib/python3.9/site-packages (from nodeenv>=0.11.1->pre-commit->ibmcloudsql) (58.0.4)
Collecting platformdirs<3,>=2
  Downloading platformdirs-2.5.2-py3-none-any.whl (14 kB)
Collecting distlib<1,>=0.3.1
  Downloading distlib-0.3.5-py2.py3-none-any.whl (466 kB)
     |████████████████████████████████| 466 kB 10.3 MB/s eta 0:00:01
Collecting filelock<4,>=3.2
  Downloading filelock-3.7.1-py3-none-any.whl (10 kB)
Building wheels for collected packages: ibmcloudsql
  Building wheel for ibmcloudsql (PEP 517) ... done
  Created wheel for ibmcloudsql: filename=ibmcloudsql-0.5.7-py3-none-any.whl size=56666 sha256=0342a1b853a3ac991bcaa89321670960b2be7f9f40fed89e284ca0daa9ebbbdd
  Stored in directory: /tmp/wsuser/.cache/pip/wheels/71/0e/f4/15e8b94f8c03160c7d48b86c017f287c7ca8d58a6fb4bb0d32
Successfully built ibmcloudsql
Installing collected packages: platformdirs, filelock, distlib, virtualenv, numpy, nodeenv, identify, cfgv, pre-commit, isodate, deprecated, backoff, ibmcloudsql
  WARNING: The script virtualenv is installed in '/home/wsuser/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The scripts f2py, f2py3 and f2py3.9 are installed in '/home/wsuser/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script nodeenv is installed in '/home/wsuser/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script identify-cli is installed in '/home/wsuser/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The scripts pre-commit, pre-commit-validate-config and pre-commit-validate-manifest are installed in '/home/wsuser/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
scipy 1.7.3 requires numpy<1.23.0,>=1.16.5, but you have numpy 1.23.1 which is incompatible.
autoai-ts-libs 1.1.9 requires numpy<1.23,>=1.19.2; python_version >= "3.9", but you have numpy 1.23.1 which is incompatible.
Successfully installed backoff-1.10.0 cfgv-3.3.1 deprecated-1.2.13 distlib-0.3.5 filelock-3.7.1 ibmcloudsql-0.5.7 identify-2.5.1 isodate-0.6.1 nodeenv-1.7.0 numpy-1.23.1 platformdirs-2.5.2 pre-commit-2.20.0 virtualenv-20.15.1
torsstei commented 2 years ago

This error can be ignored. But if you precede the install of ibmncloudsql with the following steps this should avoid the error message.

!pip install pyarrow 
!pip install sqlparse
!pip uninstall --yes autoai-libs tensorflow-text numba numpy
!pip install numpy==1.22.4
torsstei commented 2 years ago

I don't think we can resolve it for good because it is related to incompatible package dependencies way beyond our package itself. So this error happens also without our package. But as said above, you should be able to just ignore the error since it does not hamper ibmcloudsql. At least when I tested it yesterday ibmcloudsql just worked fine in spite of the error message.

powellquiring commented 2 years ago

Maybe the watson team is doing some testing. Could you add ibmcloudsql into their test scenarios to highlight problems during the release cycle of new versions of watson? Or is there a better python notebook environment for IBM customers?