Installation¶
This guide will walk you through setting up the Fitness Dashboard on your local machine.
Prerequisites¶
Before you begin, ensure you have the following installed:
- Python 3.10+: Download from python.org
- Git: For cloning the repository
- MySQL: Local database server (for development)
Required Libraries¶
The application includes advanced analytics features requiring:
- scipy: Statistical analysis and scientific computing
- scikit-learn: Algorithms for automatic workout classification
- plotly: Interactive visualizations and charts
These are automatically installed with Poetry but may require additional system dependencies on some platforms.
Installation Methods¶
Choose the installation method that best suits your workflow:
Poetry provides dependency management and virtual environment handling.
Step 1: Install Poetry¶
If you don't have Poetry installed:
Note
Poetry may be installed in ~/.local/bin/poetry
on some systems.
Step 2: Clone and Setup¶
Traditional Python virtual environment setup.
Step 1: Clone Repository¶
Step 2: Create Virtual Environment¶
Step 3: Install Dependencies¶
Automatic environment activation when entering the project directory.
Step 1: Install direnv¶
Step 2: Setup Shell Integration¶
Add to your ~/.zshrc
or ~/.bashrc
:
Step 3: Project Setup¶
git clone https://github.com/dagny/fitness-dashboard.git
cd fitness-dashboard
poetry config virtualenvs.in-project true
poetry install
Step 4: Create .envrc¶
Environment Configuration¶
Create your environment configuration file:
Add the following environment variables to your .env
file:
# Database Configuration
MYSQL_USER=your_username
MYSQL_PWD=your_password
MYSQL_HOST=localhost
MYSQL_PORT=3306
# Application Settings
STREAMLIT_THEME=dark
DEBUG=true
Verify Installation¶
Test your installation by running:
# Core dependencies
python -c "import streamlit; print('Streamlit version:', streamlit.__version__)"
python -c "import pymysql; print('PyMySQL installed successfully')"
# AI/ML dependencies
python -c "import scipy; print('SciPy version:', scipy.__version__)"
python -c "import sklearn; print('Scikit-learn version:', sklearn.__version__)"
python -c "import plotly; print('Plotly version:', plotly.__version__)"
If all imports succeed, your installation is ready for AI-powered fitness analytics.
Next Steps¶
Once installation is complete:
- Database Setup: Configure your MySQL database following the Database Setup guide
- Quick Start: Launch the application with our Quick Start guide
- Configuration: Customize your setup in the Configuration Guide
Troubleshooting¶
Common Issues¶
Poetry Not Found
If poetry
command is not found, try:
~/.local/bin
to your PATH or create an alias.
MySQL Connection Error
Ensure MySQL is running and credentials are correct:
Python Version Compatibility
The application requires Python 3.10+. Check your version:
For more troubleshooting help, see the Troubleshooting Reference.