1

我正在尝试在我的系统上运行 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.
4

1 回答 1

2

在 OS X 10.5 上遇到相同问题后,以下内容对我有用:

  1. 做一个macports selfupdate:

    sudo 端口自我更新

  2. 在 macports 上安装 python 2.6

    须藤端口安装 python26

  3. 安装 python_select

    sudo 端口安装 python_select

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

    sudo python_select python26

  5. 安装 xapian-core

    sudo 端口安装 xapian-core

  6. 使用 Python 变体安装 xapian-bindings

    sudo 端口安装 xapian-bindings +python26

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

  8. 重启终端

完毕!

于 2011-01-20T14:47:56.103 回答