Python 3.13 is very new (released Oct 2024) and some packages don't have pre-built wheels yet, causing compilation errors.
cd backend
# Install minimal requirements first
pip install --upgrade pip
pip install numpy scipy
pip install scikit-learn
pip install Flask Flask-CORS
pip install textblob nltk
pip install matplotlib seaborn
pip install pyyaml python-dotenv# OpenCV - may need to compile
pip install opencv-python
pip install opencv-contrib-python
# Alternative: Use brew-installed OpenCV
# brew install opencv# PyTorch - large download
pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
# Transformers
pip install transformers datasets accelerate
# TensorBoard
pip install tensorboard
# SHAP
pip install shappip install mlflow
pip install textstat# Test feature extraction
python feature_extraction.py
# Test experiment tracker (no dependencies needed)
python experiments/experiment_tracker.pyIf you continue having issues, use Python 3.11 (most stable):
# Install Python 3.11 using pyenv
brew install pyenv
pyenv install 3.11.6
pyenv local 3.11.6
# Create new venv
python -m venv venv
source venv/bin/activate
# Install all requirements
pip install -r requirements.txtIf you just want to see the code working:
# Install only what's needed for basic tests
pip install -r requirements-minimal.txt
# Download NLTK data
python -c "import nltk; nltk.download('brown'); nltk.download('punkt')"These components work with minimal dependencies:
✅ Experiment Tracker - No ML dependencies needed
python experiments/experiment_tracker.py✅ Configuration Management - Just needs PyYAML
pip install pyyaml
cat config/experiment_config.yaml✅ Documentation - Read without running
open FEATURES.md
open CV_ANALYSIS.md
open MLOPS.mdThese need all dependencies:
❌ Feature Analysis (needs sklearn, shap, matplotlib) ❌ Computer Vision (needs opencv) ❌ Transformer Training (needs torch, transformers) ❌ Model Comparison (needs sklearn, transformers)
- Install minimal requirements (5 min)
- Run experiment tracker (works immediately)
- Read documentation (no installation needed)
- Show code quality (no need to run)
This is sufficient for portfolio/interview demos!
# Install Xcode Command Line Tools
xcode-select --install
# Update Homebrew
brew update
# Install OpenMP support
brew install libomp
# Try again
pip install scikit-learn# See what's installed
pip list
# Test imports
python -c "import numpy; print('numpy OK')"
python -c "import sklearn; print('sklearn OK')"
python -c "import flask; print('flask OK')"