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:两种安装方式有什么区别,我也不懂? 望路过的大佬们指正或讲解下

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值