methuselah methuselah - 8 months ago 60
Python Question

Problems with fastcgi when installing Django on Justhost

I am following the following tutorial at to install Django on my Justhost web server. So far I have managed to install Django and Python on my Justhost shared web server.

However, I am now stuck when trying to configure my new site. Every time I run the command:

python mysite.fcgi
I keep getting the following error message:

Traceback (most recent call last):
File "mysite.fcgi", line 9, in <module>
from django.core.servers.fastcgi import runfastcgi
ImportError: No module named fastcgi

Content of mysite.fcgi

import sys, os

# Where /home/your_username is the path to your home directory
sys.path.insert(0, "/home4/xxxxx/python")
sys.path.insert(13, "/home4/xxxxx/public_html/django-project/admin")

os.environ['DJANGO_SETTINGS_MODULE'] = 'admin.settings'
from django.core.servers.fastcgi import runfastcgi
runfastcgi(method="threaded", daemonize="false")

How do I fix it?


I had the exact same issue. Heres how to solve it

load up your ssh client

cd ~/
pip install django==1.8.7
pip install flup==1.0.2

and you should be good