Issue
File "/opt/folder/api/views.py", line 63, in from django_earthdistance.models import EarthDistance, LlToEarth File "/opt/folder/venv/lib/python3.8/site-packages/django_earthdistance/models.py", line 4, in from django.utils import six ImportError: cannot import name 'six' from 'django.utils' (/
I am finally moving to Python3 from Python2 and I just have about everything wrapped up, but I am getting this error from the dango-earthdistance package which hasn't been updated for a couple of years and apparently doesn't support the latest version of Python3 that I'm using (3.8.9). This lets me calculate distances with lat and lng in Postgres.
What's my best option?
Solution
Six is a package of tools for writing code that is compatible with both Python 2 and Python 3.
Django used to vendor their own copy of Six until they removed it in Django 3.0.
django-earthdistance is still looking for Django's copy of the Six library, and you can bring it back by installing the django-utils-six package.
See this related question for more information.
Answered By - James Mishra
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.