amazon-redshift-utils icon indicating copy to clipboard operation
amazon-redshift-utils copied to clipboard

Python requirements fail to install on Python 3.10.12

Open peycho opened this issue 1 year ago • 0 comments

Hey fellas.

Installing requirements.txt on Ubuntu 22.04 with default python 3.10.12 fails with a conflicts between redshift-connector and boto3.

How to reproduce it:

  • Start a fresh Ubuntu 22.04 ec2 instance.
~$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.3 LTS
Release:	22.04
Codename:	jammy
  • Create clean python venv.
~$ python -m venv awslabs
~$ . awslabs/bin/activate
~$ git clone [email protected]:awslabs/amazon-redshift-utils.git
~$ pip install -r amazon-redshift-utils/src/requirements.txt

The install and error output:

~$ pip install -r amazon-redshift-utils/src/requirements.txt 
Collecting wheel==0.38.1
  Downloading wheel-0.38.1-py3-none-any.whl (35 kB)
Collecting pg8000==1.11.0
  Downloading pg8000-1.11.0-py2.py3-none-any.whl (24 kB)
Collecting shortuuid==0.4.3
  Downloading shortuuid-0.4.3.tar.gz (6.1 kB)
  Preparing metadata (setup.py) ... done
Collecting six==1.10.0
  Downloading six-1.10.0-py2.py3-none-any.whl (10 kB)
Collecting boto3==1.5.3
  Downloading boto3-1.5.3-py2.py3-none-any.whl (128 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 128.2/128.2 KB 19.9 MB/s eta 0:00:00
Collecting pgpasslib==1.1.0
  Downloading pgpasslib-1.1.0-py2.py3-none-any.whl (7.8 kB)
Collecting redshift-connector==2.0.908
  Downloading redshift_connector-2.0.908-py3-none-any.whl (112 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 112.0/112.0 KB 24.0 MB/s eta 0:00:00
Collecting s3transfer<0.2.0,>=0.1.10
  Downloading s3transfer-0.1.13-py2.py3-none-any.whl (59 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 59.6/59.6 KB 15.3 MB/s eta 0:00:00
Collecting botocore<1.9.0,>=1.8.17
  Downloading botocore-1.8.50-py2.py3-none-any.whl (4.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.1/4.1 MB 46.3 MB/s eta 0:00:00
Collecting jmespath<1.0.0,>=0.7.1
  Downloading jmespath-0.10.0-py2.py3-none-any.whl (24 kB)
Collecting packaging
  Using cached packaging-23.2-py3-none-any.whl (53 kB)
INFO: pip is looking at multiple versions of pgpasslib to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of boto3 to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of six to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of shortuuid to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of pg8000 to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of <Python from Requires-Python> to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of wheel to determine which version is compatible with other requirements. This could take a while.
ERROR: Cannot install -r amazon-redshift-utils/src/requirements.txt (line 5) and -r amazon-redshift-utils/src/requirements.txt (line 7) because these package versions have conflicting dependencies.

The conflict is caused by:
    boto3 1.5.3 depends on botocore<1.9.0 and >=1.8.17
    redshift-connector 2.0.908 depends on botocore<2.0.0 and >=1.12.201

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

I'm not sure which one of both is more convenient to update but I'd go with boto3==1.34.44

peycho avatar Feb 19 '24 15:02 peycho