Rico
Rico

Reputation: 6042

sphinx-quickstart fails

I'm really having trouble getting to the first rung of the Sphinx tutorial ladder.

I need to implement Sphinx for work projects. We are starting fresh with a new code-base (Django) for a large project.

I've been tasked with setting up our new code-base (automated unit tests, documentation, etc). I've used doxygen in the past (mostly for C++ and a bit for Python). I've read a lot of sources saying Sphinx is the best for Python and I'd like to give it a try.

The problem is that I can't even seem to get through the first step of the tutorial - sphinx-quickstart.

I am able to tab-complete the command so I assume it's installed correctly. (maybe not?)

Here is the error I get:

  File "/usr/local/bin/sphinx-quickstart", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 2655, in <module>
    working_set.require(__requires__)
  File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 648, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 546, in resolve
    raise DistributionNotFound(req)
  pkg_resources.DistributionNotFound: docutils>=0.7

I've tried to find some online info related to this problem but I haven't been able to find anything useful.

Any suggestions?

Upvotes: 1

Views: 3680

Answers (2)

D.Shawley
D.Shawley

Reputation: 59563

Try:

pip install --force-reinstall sphinx

It looks like the Sphinx package was not correctly installer or, more correctly, it's dependencies are not currently installed. If you do not have super-user privilege, then find an administrator to install or use virtualenv instead.

I highly recommend using virtualenv whenever possible since it does not touch the stuff in /usr/local or any of the Python .../site-packages directories. I will warn you that it is rather addictive :-)

Upvotes: 3

AlG
AlG

Reputation: 15157

Looks like you are missing docutils, or you have an older version;

pkg_resources.DistributionNotFound: docutils>=0.7

Are you sure it's installed?

Upvotes: 3

Related Questions