How do you install Docutils from the Terminal so that Django admindocs will work?

kd4ttc picture kd4ttc · Jul 7, 2012 · Viewed 17.4k times · Source

Docutils is a great package. If you are using Django the admindocs package needs docutils. Instructions are available for installing with a web browser, but what if you are remote and logging in with a terminal over SSH? How to install in that case? What if you just want a quick recipe to do the job with the terminal?

Answer

Beau picture Beau · Oct 10, 2012

I know I'm rather late to this question, but the accepted answer doesn't really reflect the common best practices from Python community members (and even less so from the Django community members.) While the outlined manual installation process does work, is is far more pains taking and error prone than the following:

You really should be using Pip. With Pip installing docutils system wide is as simple as:

$ sudo pip install docutils

This not only works for docutils but nearly any package on the 'Cheese Shop' as well as many other code repositories (Github, Bitbucket, etc.)

You may also want to look into other common Python best practice tools like virtualenv and virtualenvwrapper so that you can avoid global package installation.

To install Pip on Ubuntu/Debain I generally do the following:

$ sudo apt-get install python-pip

BTW: for virtualenv 'sudo apt-get install python-virtualenv' and for virtualenvwrapper 'sudo apt-get install virtualenvwrapper'.