installing docutils on Dreamhost

12 views
Skip to first unread message

Rémi

unread,
Jun 2, 2006, 8:54:49 AM6/2/06
to django...@googlegroups.com
Hello

Sorry for the newbie question, but has anyone installed docutils on
Dreamhost? I tried this:
(using http://docutils.sourceforge.net/docs/dev/policies.html)

- I'm on my /home/user directory
- svn checkout svn://svn.berlios.de/docutils/trunk/docutils
- I edit .bash_profile to
umask 002
export PATH=$PATH:$HOME/django/django_src/django/bin
export PYTHONPATH=$PYTHONPATH:$HOME/django/django_src:$HOME/django/
django_projects
export PATH=$PATH:$HOME/docutils/docutils/tools
export PYTHONPATH=$PYTHONPATH:$HOME/docutils/docutils
export PYTHONPATH=$PYTHONPATH:$HOME/docutils/docutils/extras
- then I do a source ~/.bash_profile
- then in /home/user/docutils I use "python setup.py install"

In /home/user/docutils/test I run "./alltests.py" and everything's fine
If I do a "import docutils" in a python session, no error report. So
it should be fine.

Yet, even after a "pkill python", I still get a "Please install
docutils" message when I hit the documentation page on Django admin.

Have I forgotten to do something ?
Thanks for your help,


--Remi

ska...@gmail.com

unread,
Jun 2, 2006, 12:31:40 PM6/2/06
to Django users
I have installed docutils 0.4 for use with my dreamhosted Django sites.

I did not edit the .bash_profile like you. Instead I ran "setup.py
install --prefix $HOME" which created the bin and lib dir right in
$HOME. Then in my django.fcgi file I added
$HOME/lib/python2.3/site-packages/ to the PYTHONPATH like this.
sys.path += ['/home/MYUSER/lib/python2.3/site-packages']

That has worked for me. I hope it works for you. Good luck.

Waylan Limberg

unread,
Jun 2, 2006, 12:43:05 PM6/2/06
to django...@googlegroups.com
Yeah, editing .bash_profile affects the shell. However django is not
run from the shell (unless your running the dev server from the shell
for testing), but is run through fcgi, so you need to edit the fcgi
file to tell it about your new path. or if your using mod_python, then
you need to edit the apache mod_python settings for that install. A
simple mistake that is easy for any newbie to make.


--
----
Waylan Limberg
way...@gmail.com

Rémi

unread,
Jun 2, 2006, 1:09:41 PM6/2/06
to django...@googlegroups.com
On 2 Jun 2006, at 18:31, j...@skabber.com wrote:

> I did not edit the .bash_profile like you. Instead I ran "setup.py
> install --prefix $HOME" which created the bin and lib dir right in
> $HOME. Then in my django.fcgi file I added
> $HOME/lib/python2.3/site-packages/ to the PYTHONPATH like this.
> sys.path += ['/home/MYUSER/lib/python2.3/site-packages']
>
> That has worked for me. I hope it works for you. Good luck.

At last it works! Thanks a lot!!!
Thank you Waylan for the explanation too!


--Remi

Sean R.

unread,
Jun 4, 2006, 4:43:40 PM6/4/06
to Django users
Hello - I'll be releasing a full howto on django and Dreamhost (yeah
another one) later this week. It will show how to handle docutils and
all those other packages with much less work. I'll post here whenever
I've cleaned it up.

--
Sean R.

Jason Haury

unread,
Mar 22, 2011, 12:42:05 PM3/22/11
to django...@googlegroups.com, ska...@gmail.com
Here's my short how-to on getting docultils working on Dreamhost where Passenger is used to wrap Django.  At the time of writing, this is the way DreamHost recommends one use Python code with web development.  

Using j...@skappber.com's tips below, one can successfully install docutils.  Just as others have to communicate this installation path to FastCGI, etc, a Passenger user needs to edit their passenger_wsgi.py file.  What I did was find the line that says: "sys.path.append(os.getcwd())" then add a line right after it that looks something like sys.path.append('/home/MY_USER/lib/python2.5/site-packages/').


Substitute MY_USER with the correct user name, and also be aware of what python version is actually being run.  Currently, it's 2.5.  In the instructions above, it was 2.3.   Change the path accordingly.

Enjoy!
Jason
Reply all
Reply to author
Forward
0 new messages