Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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. When I run pyjade -c django input.jade output.html I get the error 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.

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?

like image 923
Hat Avatar asked Feb 16 '14 17:02

Hat


2 Answers

Re-install via easy_setup (vs pip) solved it for me on OS X Mavericks:

sudo easy_install six

Hope that helps you!

like image 98
ljs.dev Avatar answered Sep 19 '22 14:09

ljs.dev


An old setuptools was my culprit.

pip install -U setuptools

like image 34
laffuste Avatar answered Sep 20 '22 14:09

laffuste