Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
The error ImportError: No module named django.conf when running gunicorn_django suggests that Gunicorn cannot find your Django installation or project. Here are the most likely causes and steps to resolve the issue:
Ensure that the virtual environment where Django is installed is correctly activated.
echo $VIRTUAL_ENV
This should output the path to your virtual environment. If it’s empty, activate the virtual environment:
source /path/to/your/venv/bin/activate
Confirm Django is installed in the virtual environment:
pip list | grep Django
If Django is not listed, install it:
pip install django
gunicorn_djangoThe gunicorn_django command has been deprecated and removed in newer Gunicorn versions. Instead, you should use the following command:
gunicorn your_project_name.wsgi:application --bind 0.0.0.0:8000
Replace your_project_name with the name of your Django project.
wsgi.py FileEnsure the wsgi.py file exists and is configured correctly. It should be located in the root of your project folder (e.g., your_project_name/wsgi.py).
A typical wsgi.py file looks like this:
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'your_project_name.settings')
application = get_wsgi_application()
Gunicorn may be using the wrong Python interpreter, leading to the ImportError.
which gunicorn
Ensure it's the one inside your virtual environment (e.g., `/path/to/venv/bin/gunicorn`).
If not, specify the Python interpreter explicitly when running Gunicorn:
/path/to/venv/bin/gunicorn your_project_name.wsgi:application --bind 0.0.0.0:8000
`