Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python requirements fail to install on Python 3.10.12 #714

Open
peycho opened this issue Feb 19, 2024 · 0 comments
Open

Python requirements fail to install on Python 3.10.12 #714

peycho opened this issue Feb 19, 2024 · 0 comments

Comments

@peycho
Copy link

peycho commented Feb 19, 2024

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 git@github.com: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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant