我正在尝试在我的系统上运行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.
答案 0 :(得分:2)
在OS X 10.5上遇到同样的问题之后,以下内容对我有用:
制作一个macports selfupdate:
sudo port selfupdate
在macports上安装python 2.6
sudo port install python26
安装python_select
sudo port install python_select
选择python 2.6作为系统默认值
sudo python_select python26
安装xapian-core
sudo port install xapian-core
使用PYTHON VARIANT安装xapian-bindings
sudo port install xapian-bindings + python26
将所有python库从“/Library/Python/2.5/site-packages”复制到 “/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages” 这是您新的默认站点包文件夹!
重新启动终端
完成!