Aptana ImportError:没有名为haystack的模块
如果我用sudo pip install django haystack安装最新的稳定的1.2.7Aptana ImportError:没有名为haystack的模块,aptana,aptana3,django-haystack,Aptana,Aptana3,Django Haystack,如果我用sudo pip install django haystack安装最新的稳定的1.2.7django haystack,它工作得很好。但在卸载它并安装最新的dev版本2.0.0 BETA之后,请按照主页上的建议: pip install -e git+https://github.com/toastdriven/django-haystack.git@master#egg=django-haystack 尽管有以下成功消息,但它似乎没有正确安装: Obtaining django-h
django haystack
,它工作得很好。但在卸载它并安装最新的dev版本2.0.0 BETA之后,请按照主页上的建议:
pip install -e git+https://github.com/toastdriven/django-haystack.git@master#egg=django-haystack
尽管有以下成功消息,但它似乎没有正确安装:
Obtaining django-haystack from git+https://github.com/toastdriven/django-haystack.git@master#egg=django-haystack
Cloning https://github.com/toastdriven/django-haystack.git (to master) to ./src/django-haystack
Running setup.py egg_info for package django-haystack
Installing collected packages: django-haystack
Running setup.py develop for django-haystack
Checking .pth file support in /usr/local/lib/python2.7/dist-packages/
/usr/bin/python -E -c pass
TEST PASSED: /usr/local/lib/python2.7/dist-packages/ appears to support .pth files
Creating /usr/local/lib/python2.7/dist-packages/django-haystack.egg-link (link to .)
Adding django-haystack 2.0.0-beta to easy-install.pth file
Installed /home/kave/projects/cb/src/django-haystack
Successfully installed django-haystack
Cleaning up...
因为当我进入django shell环境并执行
>>> from haystack import indexes
Traceback (most recent call last):
File "<console>", line 1, in <module>
ImportError: No module named haystack
我终于让它工作了 正如我所说的,问题是
pip安装-e git+https://github.com/toastdriven/django-haystack.git@master#egg=django haystack显然不起作用
我只是卸载了它,并确保它被删除
然后我简单地将源代码下载为zip文件,将其解压缩并保存
python setup.py build
sudo python setup.py install
这样,它将保证工作。希望这对某人有所帮助。在您的shell中,当前目录是什么?系统路径的值?谢谢。我刚刚打印了sys.path
,我看到了'/home/kave/projects/cb/src/django haystack',
我看到路径存在于那里。在我的问题中,我还有完整的系统路径。
python setup.py build
sudo python setup.py install