我已经通过 macports 安装了 xapian,那么为什么这个 python 应用程序告诉我需要安装 xapian?

发布于 2024-09-06 06:40:37 字数 1020 浏览 2 评论 0原文

我正在尝试在我的系统上运行 python 应用程序。当我尝试执行它时,我得到一个回溯,其结尾是说我需要安装 Xapian。所以我继续使用 macports 安装了 xapian-core 和 xapian-bindings。然后我尝试再次运行 python 应用程序,但得到了相同的回溯。关于我下一步应该做什么有什么想法吗?我需要安装某种额外的 xapian-python 东西吗?这种事情对我来说都是新鲜事。

我使用的是 Mac OS 10.6.3、Python 2.6.5 和 Django 1.2.1

以下是我得到的回溯的最后几行:

File "/Users/nick/dev/ymtest/../ymtest/lib/haystack/__init__.py", line 46, in <module>
backend = load_backend(settings.HAYSTACK_SEARCH_ENGINE)
File "/Users/nick/dev/ymtest/../ymtest/lib/haystack/__init__.py", line 21, in load_backend
return __import__('haystack.backends.%s_backend' % settings.HAYSTACK_SEARCH_ENGINE, {}, {}, [''])
File "/Users/nick/dev/ymtest/../ymtest/lib/haystack/backends/xapian_backend.py", line 18, in <module>
raise MissingDependency("The 'xapian' backend requires the installation of 'xapian'. Please refer to the documentation.")
haystack.exceptions.MissingDependency: The 'xapian' backend requires the installation of 'xapian'. Please refer to the documentation.

I'm trying to run a python application on my system. When I try to execute it I get a traceback which ends with something saying I need to install Xapian. So I went ahead an installed xapian-core and xapian-bindings using macports. Then I tried to run the python application again, but got the same traceback. Any ideas about what I should do next? Is there some kind of additional xapian-python thingy I need to install? This kind of thing is all new to me.

I'm using Mac OS 10.6.3, Python 2.6.5 and Django 1.2.1

Here are the last few lines of the traceback I get:

File "/Users/nick/dev/ymtest/../ymtest/lib/haystack/__init__.py", line 46, in <module>
backend = load_backend(settings.HAYSTACK_SEARCH_ENGINE)
File "/Users/nick/dev/ymtest/../ymtest/lib/haystack/__init__.py", line 21, in load_backend
return __import__('haystack.backends.%s_backend' % settings.HAYSTACK_SEARCH_ENGINE, {}, {}, [''])
File "/Users/nick/dev/ymtest/../ymtest/lib/haystack/backends/xapian_backend.py", line 18, in <module>
raise MissingDependency("The 'xapian' backend requires the installation of 'xapian'. Please refer to the documentation.")
haystack.exceptions.MissingDependency: The 'xapian' backend requires the installation of 'xapian'. Please refer to the documentation.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

待天淡蓝洁白时 2024-09-13 06:40:37

在 OS X 10.5 上遇到同样的问题后,以下方法对我有用:

  1. make a macports selfupdate:

    sudo port selfupdate

  2. 通过 macports 安装 python 2.6

    sudo port install python26

  3. 安装 python_select

    sudo port install python_select

  4. 选择 python 2.6 作为系统默认值

    sudo python_select python26

  5. 安装 xapian-core

    sudo port install xapian-core

  6. 使用 PYTHON VARIANT 安装 xapian-bindings

    sudo port install xapian-bindings +python26

  7. 从“/Library/Python/2.5/site-packages”复制所有 python 库“ 到
    “/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages”
    这是您新的默认 site-packages 文件夹!

  8. 重新启动终端

完成!

The following worked for me after having the same issue on OS X 10.5:

  1. make a macports selfupdate:

    sudo port selfupdate

  2. install python 2.6 over macports

    sudo port install python26

  3. install python_select

    sudo port install python_select

  4. select python 2.6 as system default

    sudo python_select python26

  5. install xapian-core

    sudo port install xapian-core

  6. install xapian-bindings WITH PYTHON VARIANT

    sudo port install xapian-bindings +python26

  7. copy all your python libs from "/Library/Python/2.5/site-packages" to
    "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages"
    wich is your new default site-packages folder!

  8. restart Terminal

Done!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文