Hi I trying to Install django-ads-txt to my Django Project.
嗨,我试图安装django-ads-txt到我的django项目。
My first step was to pip install django-ads-txt
then I added in the urls path('ads.txt', include('ads_txt.urls')),
when I tried to python manage.py migrate
I got the following error:
我的第一步是通过pip安装django-ads-txt,然后添加URL路径(‘ads.txt’,Include(‘ads_txt.urls’)),当我尝试执行python Manage.py迁移时,收到以下错误:
from django.utils.encoding import python_2_unicode_compatible
ImportError: cannot import name 'python_2_unicode_compatible' from 'django.utils.encoding'
I tried to pip install six
but the same error kept showing
我试图通过PIP安装6个,但同样的错误一直显示
My question: How to fix this error to install django-ads-txt?
我的问题是:如何修复这个错误以安装django-ads-txt?
更多回答
looks like github.com/flyingelephantlab/django-ads-txt has not been updated in 4+ years, you will most likely need to downgrade your python/django versions to be compatible
看起来githorb.com/flyingevphantlab/django-ads-txt已经4年多没有更新了,你很可能需要降级你的python/django版本才能兼容
优秀答案推荐
我是一名优秀的程序员,十分优秀!