我正在为 Django 模板运行pyjade,因为我发现它更容易编写,但我正在尝试使用内置转换器将其转换为 html。当我运行时,pyjade -c django input.jade output.html
我得到了错误pkg_resources.DistributionNotFound: six
。然而,这个包six
确实存在,我可以在 python 上导入它,当我运行pip install six --upgrade
它时说它已经是最新的了。
这是完整的回溯:
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
什么会导致这个错误?