pip install django-haystack 时报错:UnicodeDecodeError: 'gbk' codec can't decode byte 0xa1的解决方案

对于一个搜索引擎来说,至少应该能够根据用户的搜索关键词对搜索结果进行排序以及高亮关键字。现在我们就来使用 django-haystack 实现这些特性。
具体的Django haystack安装和配置教程:https://www.zmrenwu.com/post/45/

  1. 下面是我具体的错误信息
    这里写图片描述
    思路:应该是编码的问题
  2. 查看官网(http://haystacksearch.org/)有具体的安装教程
 1. Install the package:
    ①.Latest stable (2.6.0) off PyPI: pip install django-haystack
    ②.Latest dev off GitHub: pip install -e git+https://github.com/django-haystack/django-haystack.git@master#egg=django-haystack
 2. Add haystack to your INSTALLED_APPS.
 3. Create search_indexes.py files for your models.
 4. Setup the main SearchIndex via autodiscover.
 5. Include haystack.urls to your URLconf.
 6. Search!

解决方案
采用github的方式安装就成功了
这里写图片描述
ps:两种安装方式有什么区别,我也不懂? 望路过的大佬们指正或讲解下

猜你喜欢

转载自blog.csdn.net/tyt_xiaotao/article/details/80955685