ImportError: No module named django_filters

后端 未结 5 1930
长情又很酷
长情又很酷 2020-12-16 09:34

I am using Django 1.7.1 and I pip installed django-filters to my virtual env at /.virtualenvs/auction2/lib/python2.7/site-packages$

It said it was insta

5条回答
  •  我在风中等你
    2020-12-16 10:06

    I had a similar issue using django 1.7, djangorestframework==3.2.0 and latest django-filter==0.13.0:

    Using DjangoFilterBackend, but django-filter is not installed
    cannot import name Expression
    

    I finally fixed it by downgrading django-filter to 0.11.

    Now pip freeze looks like this and its working:

    Django==1.7
    django-filter==0.11.0
    djangorestframework==3.2.0
    

提交回复
热议问题