[英]getting DistributionNotFound error, but package exists
I am running pyjade for Django templates as I find it much easier to write in, but I am trying to convert it to html with the built in converter. 我正在为Django模板运行pyjade ,因为我发现它更容易写入,但我试图将其转换为内置转换器的html。 When I run pyjade -c django input.jade output.html
I get the error pkg_resources.DistributionNotFound: six
. 当我运行pyjade -c django input.jade output.html
我得到错误pkg_resources.DistributionNotFound: six
。 However, the package six
does in fact exist, and I can import it on python, and when I run pip install six --upgrade
it says it is already up-to-date. 但是,实际上six
包确实存在,我可以在python上导入它,当我运行pip install six --upgrade
它说它已经是最新的了。
Here is the full traceback: 这是完整的追溯:
Traceback (most recent call last):
File "/usr/local/bin/pyjade", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2707, in <module>
working_set.require(__requires__)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 686, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 584, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: six
What would be causing this error? 会导致此错误的原因是什么?
Re-install via easy_setup (vs pip) solved it for me on OS X Mavericks: 通过easy_setup(vs pip)重新安装,在OS X Mavericks上为我解决了这个问题:
sudo easy_install six
Hope that helps you! 希望对你有所帮助!
一个旧的安装工具是我的罪魁祸首。
pip install -U setuptools
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.