Skip to main content

Environment Setup Guide

This guide will help you set up a complete Python development environment for the Data Science Bootcamp. Follow these steps to install Python, create virtual environments, and install all required dependencies.
We recommend creating a dedicated virtual environment called Bootcamp for all coursework to keep dependencies isolated and organized.

Prerequisites

System Requirements

  • Python 3.8 or higher (3.10 recommended)
  • 4GB RAM minimum (8GB recommended for larger datasets)
  • 2GB free disk space for Python, libraries, and datasets
  • Terminal access (CMD/PowerShell on Windows, Terminal on macOS/Linux)
  • Git (optional, for version control)

Check Python Installation

Before starting, verify Python is installed:
python --version
You should see output like Python 3.10.x or higher.

Installation Options

You can set up your environment using either venv (Python’s built-in tool) or Anaconda/Miniconda (data science-focused distribution). venv is lightweight and comes pre-installed with Python 3.3+.
1

Create Virtual Environment

Create a new virtual environment named Bootcamp:
python -m venv Bootcamp
This creates a Bootcamp/ directory containing an isolated Python environment.
2

Activate Virtual Environment

Activate the environment to use it:
.\Bootcamp\Scripts\Activate.ps1
On Windows PowerShell, if you get an execution policy error, run:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
When activated, you’ll see (Bootcamp) at the start of your terminal prompt.
3

Upgrade pip

Update pip to the latest version:
pip install --upgrade pip
4

Install Core Dependencies

Install all required packages for the bootcamp:
pip install jupyter numpy pandas matplotlib seaborn scikit-learn tensorflow keras torch torchvision streamlit lxml requests
This installs:
  • jupyter: Interactive notebook environment
  • numpy: Numerical computing library
  • pandas: Data manipulation and analysis
  • matplotlib, seaborn: Data visualization
  • scikit-learn: Machine learning algorithms
  • tensorflow, keras: Deep learning framework
  • torch, torchvision: PyTorch deep learning framework
  • streamlit: Interactive web apps for data science
  • lxml, requests: Web scraping and data loading
5

Verify Installation

Verify all packages are installed correctly:
pip list
You should see all installed packages with their versions.Test core imports:
python -c "import numpy, pandas, matplotlib, sklearn; print('All core packages imported successfully!')"

Option 2: Using Anaconda/Miniconda

Anaconda includes pre-installed data science packages and its own package manager.
1

Install Anaconda or Miniconda

Download and install from:Follow the installer instructions for your operating system.
2

Create Conda Environment

Create a new environment with Python 3.10:
conda create -n Bootcamp python=3.10
Confirm by typing y when prompted.
3

Activate Conda Environment

Activate the environment:
conda activate Bootcamp
4

Install Packages

Install packages using conda and pip:
# Install from conda-forge channel (preferred for data science)
conda install -c conda-forge jupyter numpy pandas matplotlib seaborn scikit-learn

# Install remaining packages with pip
pip install tensorflow keras torch torchvision streamlit lxml requests
5

Verify Installation

Check installed packages:
conda list

Project-Specific Setup

Installing from requirements.txt

Many projects include a requirements.txt file listing all dependencies. To install from this file:
1

Navigate to Project Directory

cd path/to/project
2

Install Requirements

pip install -r requirements.txt

Example: Module A3 Project Setup

For the Data Preparation project (Module A3):
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
The requirements.txt for this module includes:
numpy
pandas
lxml
requests
streamlit

Launching Jupyter Notebook

Jupyter notebooks are the primary tool for interactive data science work.
1

Ensure Virtual Environment is Active

You should see (Bootcamp) in your terminal prompt.
2

Launch Jupyter

jupyter notebook
This will:
  1. Start the Jupyter server
  2. Open your default web browser
  3. Display the notebook interface at http://localhost:8888
3

Create or Open Notebook

  • Click New → Python 3 to create a new notebook
  • Navigate to existing .ipynb files to open them
4

Stop Jupyter Server

When finished, press Ctrl+C in the terminal where Jupyter is running, then confirm with y.

Running Python Scripts

Basic Execution

With your virtual environment activated:
python script_name.py

Example: Running Module 2 Demos

From the Bootcamp repository:
# Navigate to lesson directory
cd Bootcamp-main/Modulo2/Leccion2

# Run the demo
python demo.py

# Run a specific example
python ejemplo.py

Running Streamlit Dashboards

Several projects include interactive Streamlit dashboards.
1

Ensure Dependencies are Installed

pip install streamlit
2

Run the Dashboard

streamlit run dashboard.py
This will:
  1. Start the Streamlit server
  2. Open your browser to http://localhost:8501
3

Interact with Dashboard

The dashboard will update in real-time as you interact with it.
4

Stop Streamlit

Press Ctrl+C in the terminal.

Managing Your Environment

Deactivating Virtual Environment

When you’re done working:
deactivate

Removing Virtual Environment

To completely remove an environment:
# Simply delete the directory
rm -rf Bootcamp/  # macOS/Linux
rmdir /s Bootcamp  # Windows

Exporting Dependencies

To share your environment setup:
pip freeze > requirements.txt

Common Issues and Solutions

Issue: “Python not found” or “Command not found”

Solution:
  • Ensure Python is added to your system PATH during installation
  • Try python3 instead of python on macOS/Linux
  • Reinstall Python with “Add to PATH” option checked

Issue: Permission denied when installing packages

Solution:
  • Ensure your virtual environment is activated
  • Don’t use sudo with pip in a virtual environment
  • On Windows, run terminal as Administrator if needed

Issue: Module not found after installation

Solution:
  • Verify virtual environment is activated
  • Check you’re using the correct Python interpreter: which python (macOS/Linux) or where python (Windows)
  • Reinstall the package: pip install --force-reinstall package-name

Issue: Jupyter kernel not found

Solution:
python -m ipykernel install --user --name=Bootcamp
Always activate your virtual environment before installing packages or running scripts. This prevents conflicts with system Python packages.

Best Practices

  1. One environment per project: Create separate environments for different projects to avoid dependency conflicts
  2. Keep requirements updated: Regularly update your requirements.txt as you add packages
  3. Use version control: Git-ignore your virtual environment folder (it can be recreated from requirements.txt)
  4. Document dependencies: Always include a requirements.txt or environment.yml with your projects
  5. Regular updates: Periodically update packages for security and bug fixes:
    pip list --outdated
    pip install --upgrade package-name
    

Next Steps

Now that your environment is set up, you’re ready to start coding!

Bootcamp Overview

Review the complete curriculum and module structure

Start Module A2

Begin with Python fundamentals and your first project

Build docs developers (and LLMs) love