Skip to content

Python Requirements Guide for iDrv5-MyFR8

This guide explains the Python dependencies for the iDrv5-MyFR8 logistics management platform and how to use them for different deployment scenarios.

This guide explains the Python dependencies for the iDrv5-MyFR8 logistics management platform and how to use them for different deployment scenarios.

For production deployments on third-party servers

  • Contains all dependencies needed to run the application in production
  • Version numbers are pinned for stability
  • Optimized for performance and security

For local development and testing

  • Includes all production dependencies
  • Adds development tools, testing frameworks, and debugging utilities
  • Useful for setting up local development environments

Note: Replit manages its own requirements.txt file automatically. The files above are for deploying to external servers.

Terminal window
# Install production dependencies
pip install -r REQUIREMENTS_PRODUCTION.txt
# Or for development
pip install -r REQUIREMENTS_DEVELOPMENT.txt
# In your Dockerfile
COPY REQUIREMENTS_PRODUCTION.txt /app/
RUN pip install -r REQUIREMENTS_PRODUCTION.txt
Terminal window
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r REQUIREMENTS_PRODUCTION.txt
  • Flask 3.0.3: Web application framework
  • SQLAlchemy 2.0.31: Database ORM
  • Gunicorn 23.0.0: WSGI HTTP server for production
  • psycopg2-binary: PostgreSQL adapter
  • Flask-SQLAlchemy: Flask-SQLAlchemy integration
  • Flask-Migrate: Database migrations
  • Flask-Login: User session management
  • Flask-Dance: OAuth integration
  • Flask-WTF: Form handling and CSRF protection
  • ortools: Route optimization algorithms
  • pandas: Data manipulation and analysis
  • WeasyPrint: PDF generation for reports
  • opencv-python-headless: Image processing
  • twilio: SMS notifications
  • sendgrid: Email notifications
  • Flask-SocketIO: Real-time communication
  • openai: AI-powered features
  • scikit-learn: Machine learning algorithms

Some Python packages require system-level dependencies:

Terminal window
sudo apt-get update
sudo apt-get install -y \
libpq-dev \
wkhtmltopdf \
tesseract-ocr \
poppler-utils \
libffi-dev \
libssl-dev
Terminal window
sudo yum install -y \
postgresql-devel \
wkhtmltopdf \
tesseract \
poppler-utils \
libffi-devel \
openssl-devel
  • Python: 3.11+ (recommended 3.11)
  • PostgreSQL: 12+ (recommended 16+)
  • Node.js: 18+ (for frontend build tools, if needed)
  1. Clone the repository
  2. Set up virtual environment
  3. Install development dependencies
  4. Set up environment variables
  5. Initialize database
  6. Run the application
Terminal window
# Complete development setup
git clone [repository-url]
cd idrv5-myfr8
python -m venv venv
source venv/bin/activate
pip install -r REQUIREMENTS_DEVELOPMENT.txt
cp .env.example .env
# Edit .env with your database credentials
flask db upgrade
python main.py

For production deployment, use the deployment scripts and Docker configurations provided in the docs/ directory:

  • docs/DEPLOYMENT.md - Complete deployment guide (dev + production)
  • Dockerfile - Docker container configuration
  • docker-compose.yml - Multi-container setup
  • deploy.sh - Automated deployment script
  1. psycopg2 installation fails

    • Install libpq-dev (Ubuntu) or postgresql-devel (CentOS)
    • Alternative: Use psycopg2-binary (already included)
  2. WeasyPrint installation fails

    • Install wkhtmltopdf system package
    • Ensure libffi-dev is installed
  3. OpenCV installation fails

    • Use opencv-python-headless for server environments
    • Install system dependencies for image processing
  4. ortools installation fails

    • Ensure you have sufficient memory (>2GB) during installation
    • Consider using pre-compiled wheels

If you encounter issues:

  1. Check the logs for specific error messages
  2. Verify system dependencies are installed
  3. Ensure you’re using the correct Python version
  4. Check the deployment guide for your specific platform

All dependencies are open-source and compatible with commercial use. Review individual package licenses if needed for your deployment environment.