Historical Statistics on NBA Champions
This guide will help you set up the development environment for the DataAnalytics-NBA project.
- Python 3.8 or higher
- pip (Python package installer)
-
Clone the repository (if you haven't already):
git clone <repository-url> cd DataAnalytics-NBA
-
Create a virtual environment:
python -m venv venv
-
Activate the virtual environment:
On macOS/Linux:
source venv/bin/activateOn Windows:
venv\Scripts\activate
-
Verify the virtual environment is active:
which python # Should point to your venv directory pip list # Should show only basic packages
-
Install required packages (if you have a requirements.txt file):
pip install -r requirements.txt
-
Or install packages individually (if no requirements.txt exists):
pip install <package-name>
-
Verify installation:
pip list
-
Make sure your virtual environment is activated:
source venv/bin/activate # macOS/Linux # or venv\Scripts\activate # Windows
-
Run your project:
python main.py
When you're done working on the project:
deactivate- If you get permission errors: Make sure you have write permissions in the project directory
- If packages fail to install: Try upgrading pip first:
pip install --upgrade pip - If you need to recreate the environment: Delete the
venvfolder and repeat the setup steps - If Black formatting fails: Make sure you're in the virtual environment and Black is installed
- Always activate the virtual environment before working on the project
- The virtual environment keeps project dependencies isolated from your system Python
- Remember to add
venv/to your.gitignorefile if it's not already there