Complete guide for setting up and running the full stress detection system with Django web application and Rasa chatbot.
- Operating System: Windows 10/11 (tested) or Linux/macOS
- Python: 3.8+ (Python 3.9 recommended)
- RAM: 8GB minimum (16GB recommended)
- Storage: 5GB free space
- Git: Latest version
git clone https://github.com/suragsunil/STRESS-DETECTION-FOR-IT-PROFESSIONALS.git
cd "Stress Detection for IT Professionals"# Navigate to Django project directory
cd strees_dection
# Create virtual environment
python -m venv venv
# Activate virtual environment
# Windows:
.\venv\Scripts\Activate.ps1
# Linux/Mac:
# source venv/bin/activate# Upgrade pip first
python -m pip install --upgrade pip
# Install core Django dependencies
pip install Django==4.2.20 djangorestframework==3.15.2
# Install database and utility packages
pip install psycopg2-binary python-dotenv whitenoise
# Install JWT authentication
pip install djangorestframework-simplejwt PyJWT==2.4.0
# Install machine learning packages
pip install numpy pandas scikit-learn matplotlib librosa
# Install cryptography (specific version for compatibility)
pip install cryptography==3.4.8
# Install Rasa (global installation recommended)
pip install rasa==3.6.21 rasa-sdk==3.6.2# Run migrations
python manage.py migrate
# Optional: Create superuser for admin access
python manage.py createsuperuser
# Collect static files
python manage.py collectstatic --noinput# Navigate to project directory
cd "d:\surag_projects\Stress Detection for IT Professionals\STRESS-DETECTION-FOR-IT-PROFESSIONALS\strees_dection"
# Activate virtual environment
.\venv\Scripts\Activate.ps1
# Start Django development server
python manage.py runserver
# Server will be available at: http://127.0.0.1:8000# Navigate to project directory
cd "d:\surag_projects\Stress Detection for IT Professionals\STRESS-DETECTION-FOR-IT-PROFESSIONALS\strees_dection"
# Start Rasa actions server using global Python installation
& "C:\Program Files\Python39\python.exe" -m rasa run actions --port 5055
# Server will be available at: http://0.0.0.0:5055# Navigate to project directory
cd "d:\surag_projects\Stress Detection for IT Professionals\STRESS-DETECTION-FOR-IT-PROFESSIONALS\strees_dection"
# Start Rasa core server with API enabled
& "C:\Program Files\Python39\python.exe" -m rasa run --enable-api --cors "*" --port 5005
# Server will be available at: http://localhost:5005# Windows PowerShell
Get-NetTCPConnection -LocalPort 8000,5005,5055 -ErrorAction SilentlyContinue
# Expected output should show all three ports listening# Test Rasa server health
curl http://localhost:5005/
# Test Rasa actions server
curl http://localhost:5055/health- Main Web Application:
http://127.0.0.1:8000 - Rasa Chatbot API:
http://localhost:5005 - Rasa Actions Server:
http://0.0.0.0:5055 - Django Admin:
http://127.0.0.1:8000/admin
STRESS-DETECTION-FOR-IT-PROFESSIONALS/
├── strees_dection/ # Main Django project
│ ├── app/ # Django application
│ │ ├── templates/ # HTML templates
│ │ ├── models.py # Database models
│ │ ├── views.py # View logic
│ │ └── urls.py # URL routing
│ ├── media/ # Uploaded files
│ │ ├── voice_patterns/ # Audio uploads
│ │ └── resources/ # Stress resources
│ ├── models/ # Rasa trained models
│ ├── data/ # Rasa training data
│ │ ├── nlu.yml # Natural Language Understanding
│ │ ├── stories.yml # Conversation flows
│ │ └── rules.yml # Business rules
│ ├── actions/ # Custom Rasa actions
│ │ └── actions.py # Action implementations
│ ├── manage.py # Django management script
│ └── requirements.txt # Python dependencies
├── config.yml # Rasa configuration
├── domain.yml # Rasa domain definition
├── endpoints.yml # Rasa endpoints configuration
└── HOW-TO-RUN.md # This file
Problem: ImportError: DLL load failed while importing _rust
Solution:
pip uninstall cryptography -y
pip install cryptography==3.4.8
pip uninstall PyJWT -y
pip install PyJWT==2.4.0Problem: Module not found errors
Solution:
# Use system Python instead of virtual environment for Rasa
& "C:\Program Files\Python39\python.exe" -m rasa run --enable-api --cors "*" --port 5005Problem: Migration conflicts or errors
Solution:
# Reset migrations (use with caution)
python manage.py migrate app zero
python manage.py migrateProblem: Ports 8000, 5005, or 5055 already occupied
Solution:
# Windows - Kill processes using specific ports
netstat -ano | findstr :8000
taskkill /PID <process_id> /F- Update training data in
data/directory - Retrain model:
rasa train
- Restart Rasa server to load new model
- Update models: Modify
app/models.py - Create migration:
python manage.py makemigrations
- Apply migration:
python manage.py migrate
- Restart Django server
For production deployment, consider:
- Use production WSGI server (Gunicorn, uWSGI)
- Configure proper database (PostgreSQL recommended)
- Set up reverse proxy (Nginx, Apache)
- Enable HTTPS with SSL certificates
- Configure environment variables for secrets
- Set up process monitoring (Supervisor, systemd)
For issues or questions:
- Check the project README.md for additional documentation
- Review error logs in terminal outputs
- Ensure all dependencies are correctly installed
- Verify Python and package versions match requirements
Last Updated: January 31, 2026