Cadasta / cadasta-platform

[DEPRECATED] Main repository of the Cadasta platform. Technology to help communities document their land rights around the world.
https://demo.cadasta.org
GNU Affero General Public License v3.0
53 stars 81 forks source link

Installation fails due to conflicting djangorestframework version #2048

Open NeolithEra opened 5 years ago

NeolithEra commented 5 years ago

Hi, users are unable to run cadasta-platform due to dependency conflict with djangorestframework package. As shown in the following full dependency graph of cadasta-platform, cadasta-platform requires djangorestframework==3.8.2,while djangorestframework-gis==0.12 requires djangorestframework>=3.3,<3.8.

According to pip’s “first found wins” installation strategy, djangorestframework==3.8.2 is the actually installed version. However, djangorestframework==3.8.2 does not satisfy djangorestframework>=3.3,<3.8.

Dependency tree

cadasta-platform-1.17.12
| +-argon2-cffi(version range:==18.1.0)
| +-awscli(version range:==1.15.8)
| +-beautifulsoup4(version range:==4.6.0)
| +-cadasta-workertoolbox(version range:==0.6.0)
| | +-boto3(version range:>=1.6,<1.7)
| | +-celery(version range:>=4.1.0,<=4.2)
| | +-kombu(version range:>=4.1.0,<=4.2)
| | +-mock(version range:>=2.0.0)
| | +-psycopg2(version range:>=2.7.1)
| | +-pycurl(version range:<=7.44,>=7.43.0)
| | +-raven(version range:>=6.6.0)
| | +-sqlalchemy(version range:<1.3,>=1.2)
| +-django(version range:==1.11.20)
| +-django-allauth(version range:==0.35.0)
| +-django-audit-log(version range:==0.7.0)
| +-django-buckets(version range:==0.1.25)
| | +-boto3(version range:==1.7.4)
| +-django-compressor(version range:==2.2)
| | +-django-appconf(version range:>=1.0)
| | | +-django(version range:*)
| | | +-six(version range:*)
| | +-rcssmin(version range:==1.0.6)
| | +-rjsmin(version range:==1.0.12)
| +-django-cors-headers(version range:==2.2.0)
| +-django-countries(version range:==5.3)
| +-django-crispy-forms(version range:==1.7.2)
| +-django-filter(version range:==1.1.0)
| +-django-formtools(version range:==2.1)
| | +-django(version range:>=1.8)
| +-django-jsonattrs(version range:==0.1.26)
| | +-django(version range:>=1.11,<2.1)
| | +-django-audit-log(version range:==0.7.0)
| +-django-leaflet(version range:==0.18.1)
| | +-django(version range:*)
| +-django-otp(version range:==0.4.3)
| | +-django(version range:>=1.8)
| +-django-parsley(version range:==0.7)
| | +-django(version range:>=1.8)
| +-django-sass-processor(version range:==0.6)
| +-django-simple-history(version range:==1.9.0)
| | +-six(version range:*)
| +-django-tutelary(version range:==0.1.22)
| | +-django(version range:>=1.9)
| | +-django-audit-log(version range:>=0.7.0)
| +-django-widget-tweaks(version range:==1.4.2)
| | +-django(version range:>=1.8)
| +-djangorestframework(version range:==3.8.2)
| +-djangorestframework-gis(version range:==0.12)
| | +-djangorestframework(version range:>=3.3,<3.8)
| | +-six(version range:*)
| +-djoser(version range:==1.1.5)
| | +-django-templated-mail(version range:*)
| +-drf-tmp-scoped-token(version range:==0.2.1)
| | +-djangorestframework(version range:>=3.4.0)
| | +-six(version range:*)
| +-drfdocs-cadasta(version range:==0.0.12)
| +-gdal(version range:==1.10.0)
| +-gpxpy(version range:==1.2.0)
| +-jsonschema(version range:==2.6.0)
| +-kombu(version range:==4.2.1)
| +-libsass(version range:==0.14.4)
| | +-six(version range:*)
| +-openpyxl(version range:==2.5.3)
| | +-et-xmlfile(version range:*)
| | | +-python(version range:>=2.6.0)
| | +-jdcal(version range:*)
| +-pandas(version range:==0.22.0)
| +-phonenumbers(version range:==8.9.4)
| +-pillow(version range:==5.1.0)
| +-psycopg2(version range:==2.7.4)
| +-pybreaker(version range:==0.4.2)
| +-pylibmc(version range:==1.5.2)
| +-pyparsing(version range:==2.2.0)
| +-python-magic(version range:==0.4.15)
| +-pytz(version range:==2018.4)
| +-pyxform-cadasta(version range:==0.9.22)
| | +-lxml(version range:==3.5.0)
| | | +-cython(version range:>=0.20)
| | +-unicodecsv(version range:==0.14.1)
| | +-xlrd(version range:==0.9.4)
| +-requests(version range:==2.20.0)
| | +-certifi(version range:>=2017.4.17)
| | +-chardet(version range:<3.1.0,>=3.0.2)
| | +-idna(version range:>=2.5,<2.8)
| | +-urllib3(version range:>=1.21.1,<1.25)
| +-rfc3987(version range:==1.3.7)
| +-shapely(version range:==1.6.4.post1)
| +-simplejson(version range:==3.14.0)
| +-twilio(version range:==6.12.1)
| | +-pyjwt(version range:>=1.4.2)
| | +-pytz(version range:*)
| | +-six(version range:*)

Thanks for your help. Best, Neolith

NeolithEra commented 5 years ago

Solution

  1. Fix your direct dependency to be djangorestframework-gis==0.14, as djangorestframework-gis==0.14 requires djangorestframework>=3.3,<3.10.

  2. Remove your direct dependency djangorestframework, and use the djangorestframework transitively introduced by djangorestframework-gis.

Which solution do you prefer, 1 or 2?

@oliverroick Please let me know your choice. I can submit a PR to solve this issue.

oliverroick commented 5 years ago

Hi @NeolithEra,

thanks for the report and the research to resolve the issue. It's not my call to decide on the appropriate solution, though, as I'm not working at Cadasta any more. @asafevenpaz might be able to help.

Also, bear in mind, the Cadasta platform is not actively maintained any longer.

asafevenpaz commented 5 years ago

@NeolithEra thank you for your comments. As @oliverroick has mentioned we are in the stages of phasing out this platform but we will look into your recommendations. @clash99