aws / amazon-redshift-python-driver

Redshift Python Connector. It supports Python Database API Specification v2.0.
Apache License 2.0
202 stars 72 forks source link

Installation issue #227

Closed maxim-spb closed 1 week ago

maxim-spb commented 1 week ago

Driver version

Latest. Sorry, but I don't know how to check it. ## Redshift version PostgreSQL 8.0.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3), Redshift 1.0.69065 ## Client Operating System Windows 11 ## Python version 3.11.9 ## Table schema N/A ## Problem description
  1. Expected behavior: package is installed
  2. Actual behavior: Error
  3. Error message/stack trace: Traceback (most recent call last): File "S:\Contracts\DAS\1. Administration\SoftwareOther\Python\AuditLog.py", line 18, in import redshift_connector File "\csc.nycnet\mocs\mocs_user_data\maxim.syrnev\Application Data\Python\Python311\site-packages\redshift_connector__init.py", line 4, in from redshift_connector import plugin File "\csc.nycnet\mocs\mocs_user_data\maxim.syrnev\Application Data\Python\Python311\site-packages\redshift_connector\plugin\init__.py", line 1, in from .adfs_credentials_provider import AdfsCredentialsProvider File "\csc.nycnet\mocs\mocs_user_data\maxim.syrnev\Application Data\Python\Python311\site-packages\redshift_connector\plugin\adfs_credentials_provider.py", line 6, in from redshift_connector.plugin.saml_credentials_provider import SamlCredentialsProvider File "\csc.nycnet\mocs\mocs_user_data\maxim.syrnev\Application Data\Python\Python311\site-packages\redshift_connector\plugin\saml_credentials_provider.py", line 10, in from redshift_connector.idp_auth_helper import IdpAuthHelper File "\csc.nycnet\mocs\mocs_user_data\maxim.syrnev\Application Data\Python\Python311\site-packages\redshift_connector\idp_auth_helper.py", line 5, in from packaging.version import Version ModuleNotFoundError: No module named 'packaging'
  4. Any other details that can be helpful: c:>pip install packaging returns Defaulting to user installation because normal site-packages is not writeable Requirement already satisfied: packaging in c:\programdata\anaconda3\lib\site-packages (23.1)

Python Driver trace logs

Reproduction code

import redshift_connector

Brooke-white commented 1 week ago

Hi @maxim-spb ,

Thank you for reaching out. The error you provided:

c:>pip install packaging
returns
Defaulting to user installation because normal site-packages is not writeable

Indicates there is an issue with your machine's Python configuration outside of the scope of redshift-connector. A generic recommendation for this issue is provided in https://stackoverflow.com/questions/59997065/pip-python-normal-site-packages-is-not-writeable. Best of luck!