mapbox-sdk-py icon indicating copy to clipboard operation
mapbox-sdk-py copied to clipboard

Installation fails due to conflicting python-dateutil version

Open NeolithEra opened this issue 6 years ago • 1 comments

Hi, users are unable to run mapbox due to dependency conflict with python-dateutil package. As shown in the following full dependency graph of mapbox, mapbox requires _ python-dateutil >=2.5.0_,while botocore requires python-dateutil <2.8.1,>=2.1.

According to pip’s “first found wins” installation strategy, python-dateutil 2.8.1 is the actually installed version. However, python-dateutil 2.8.1 does not satisfy <2.8.1,>=2.1.

Dependency tree-----------

mapbox - 0.18.0
| +- boto3(install version:1.10.39 version range:>=1.4)
| | +- botocore(install version:1.13.39 version range:>=1.13.39,<1.14.0)
| | | +-python-dateutil(install version:2.8.0 version range:<2.8.1,>=2.1)
| | +- jmespath(install version:0.7.0 version range:>=0.7.1,<1.0.0)
| | +- s3transfer(install version:0.2.1 version range:>=0.2.0,<0.3.0)
| +- cachecontrol(install version:0.12.5 version range:*)
| | +-msgpack(install version:0.6.2 version range:*)
| +- iso3166(install version:1.0.1 version range:*)
| +- polyline(install version:1.4.0 version range:>=1.3.1)
| | +- six(install version:1.13.0 version range:>=1.8.0)
| +- python-dateutil(install version:2.8.1 version range:>=2.5.0)
| +- requests(install version:2.22.0 version range:*)
| | +- certifi(install version:2019.11.28 version range:>=2017.4.17)
| | +- chardet(install version:3.0.4 version range:<3.1.0,>=3.0.2)
| | +- idna(install version:2.8 version range:>=2.5,<2.9)
| | +- urllib3(install version:1.25.7 version range:<1.26,>=1.21.1)
| +- uritemplate(install version:3.0.0 version range:>=2.0)

Thanks for your help. Best, Neolith

NeolithEra avatar Dec 16 '19 02:12 NeolithEra

Suggested Solution

  1. Fix your direct dependency to be python-dateutil <2.8.1,>=2.5.0. I have checked this revision will not affect your downstream projects now.
  2. Ask your upstream project botocore to loose the version range of python-dateutil.
  3. Remove your direct dependency python-dateutil, and use python-dateutil transitively introduced by botocore.

@sgillies Which solution do you prefer, 1, 2 or 3? Please let me know your choice. I can submit a PR to solve this issue.

NeolithEra avatar Dec 16 '19 02:12 NeolithEra