Day 1: Dev Environment Setup
This is the first day of our 42 Days of AI course, where we will set up our development environment for building business web applications using Python. We will install Visual Studio Code (VSCode), configure essential extensions, and set up a virtual environment. We will also explore the Jupyter notebook interface within VSCode and create a simple web application.
Table of Contents
Install VSCode
If you don’t already have VSCode installed, go do that here.
VSCode Command Palette
The Command Palette in VS Code is a powerful feature that allows you to quickly access commands and features by typing their names. It’s like a shortcut hub for all the actions within the editor. To open the Command Palette, you can use the keyboard shortcut:

To open it, press Ctrl+Shift+P (or Cmd+Shift+P on Mac), and start typing your command. It’s awesome because it speeds up your workflow by letting you jump to any function without navigating through menus or remembering keyboard shortcuts.

Install VSCode Extensions
To make the most of your Python development experience in VSCode, you’ll want to install some essential extensions. Here are a few key extensions that will enhance your workflow:
-
Python: This extension provides rich support for Python, including IntelliSense, linting, debugging, and code navigation. It is essential for any Python development in VSCode.
-
Jupyter: This extension allows you to work with Jupyter notebooks directly within VSCode. It provides a great interface for running and editing notebooks, making it easier to work with data science projects and AI models.
-
Pylance: This is a fast and feature-rich language server for Python, providing improved IntelliSense and type checking. It works seamlessly with the Python extension to enhance your coding experience.
-
GitLens: This extension supercharges the built-in Git capabilities of VSCode. It provides insights into code authorship, history, and more, making it easier to collaborate on projects
-
Prettier - Code formatter: This extension helps maintain consistent code formatting across your projects. It supports multiple languages, including Python, and can be configured to run automatically on save.
-
Live Share: This extension allows you to collaborate in real-time with others directly within VSCode. It’s great for pair programming or code reviews.
-
Docker: If you’re working with containerized applications, this extension provides support for Docker, allowing you to build, manage, and deploy containers directly from VSCode.
-
Remote - SSH: This extension allows you to connect to remote machines via SSH and work with files and folders as if they were local. It’s useful for working on remote servers or cloud instances.
-
Path Intellisense: This extension provides autocompletion for file paths in your code, making it easier to navigate and reference files within your project.
-
Python Extention Pack: This is a collection of essential Python extensions that includes the Python, Pylance, and Jupyter extensions, among others. It simplifies the setup process by bundling these key tools together.
-
GitHub Copilot: This AI-powered code completion tool helps you write code faster and with fewer errors by suggesting entire lines or blocks of code based on your input. It can be a game-changer for productivity, especially in complex projects.
-
GitHub Pull Requests and Issues: This extension allows you to manage GitHub pull requests and issues directly within VSCode. It streamlines the code review process and makes it easier to collaborate on projects hosted on GitHub.
-
Ruff: This is a fast Python linter that helps you catch errors and enforce coding standards in your Python code. It integrates well with the Python extension and provides real-time feedback as you code.
-
Better Comments: This extension helps you create more readable and organized comments in your code by allowing you to categorize comments with different colors and styles. It can improve code readability and make it easier to understand the purpose of different sections of your code.
There are many more extensions available in the VSCode marketplace, but these are some of the most essential ones for Python development and AI projects. You can install them by searching for their names in the Extensions view (Ctrl+Shift+X or Cmd+Shift+X on Mac) and clicking the Install button.
ValidatePython/AI Libraries Guide - Manual Setup
macOS Setup
Step 1: Install Homebrew (Package Manager)
# Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Add Homebrew to PATH (for Apple Silicon Macs)
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zshrc
source ~/.zshrc
# Verify installation
brew --version
Step 2: Install Python
# Install latest Python
brew install python
# Verify installation
python3 --version
pip3 --version
Step 3: Create Virtual Environment
# Create project directory
mkdir business-web-app
cd business-web-app
# Create virtual environment
python3 -m venv venv
# Activate virtual environment
source venv/bin/activate
# Verify activation (should show (venv) in prompt)
which python
Step 4: Install Essential Packages
Essential Libraries
Core Web Frameworks
- Flask: Lightweight, flexible web framework
- Django: Full-featured web framework with admin interface
- FastAPI: Modern, fast API framework with automatic documentation
- Streamlit: Rapid web app development for data science
Data Handling
- Pandas: Data manipulation and analysis
- NumPy: Numerical computing
- SQLAlchemy: Database ORM
- psycopg2: PostgreSQL adapter
- pymongo: MongoDB driver
Visualization
- Matplotlib: Basic plotting
- Seaborn: Statistical visualization
- Plotly: Interactive visualizations
- Bokeh: Interactive web visualizations
Utilities
- Requests: HTTP library
- BeautifulSoup4: Web scraping
- python-dotenv: Environment variable management
- Celery: Task queue for background jobs
# Upgrade pip first
pip install --upgrade pip
# Install Jupyter and essential libraries
pip install jupyter jupyterlab
# Install web development packages
pip install flask django fastapi streamlit
# Install data science packages
pip install pandas numpy matplotlib seaborn plotly
# Install database packages
pip install sqlalchemy psycopg2-binary pymongo
# Install additional utilities
pip install requests beautifulsoup4 python-dotenv
# Save requirements
pip freeze > requirements.txt
Windows Setup
Step 1: Install Python
- Download Python:
- Go to https://python.org/downloads/
- Download latest Python 3.x for Windows
- Important: Check “Add Python to PATH” during installation
Step 2: Install WSL
# Run in PowerShell as Administrator
wsl --install
# Restart computer when prompted
# Set up Ubuntu username and password
Step 3: Update Ubuntu in WSL
# Update package lists
sudo apt update && sudo apt upgrade -y
# Install essential tools
sudo apt install -y build-essential curl git
Step 4: Install Python
# Install Python and pip
sudo apt install -y python3 python3-pip python3-venv python3-dev
# Verify installation
python3 --version
pip3 --version
Step 5: Create Virtual Environment
# Create project directory
mkdir ~/business-web-app
cd ~/business-web-app
# Create virtual environment
python3 -m venv venv
# Activate virtual environment
source venv/bin/activate
# Verify activation
which python
Step 6 Install Essential Packages
# Upgrade pip
pip install --upgrade pip
# Install Jupyter and essential libraries
pip install jupyter jupyterlab
# Install web development packages
pip install flask django fastapi streamlit
# Install data science packages
pip install pandas numpy matplotlib seaborn plotly
# Install database packages
pip install sqlalchemy psycopg2-binary pymongo
# Install additional utilities
pip install requests beautifulsoup4 python-dotenv
# Save requirements
pip freeze > requirements.txt
Linux Setup
Step 1: Update System
# Ubuntu/Debian
sudo apt update && sudo apt upgrade -y
# CentOS/RHEL/Fedora
sudo dnf update -y
# or for older versions: sudo yum update -y
Step 2: Install Python and Dependencies
# Ubuntu/Debian
sudo apt install -y python3 python3-pip python3-venv python3-dev build-essential
# CentOS/RHEL/Fedora
sudo dnf install -y python3 python3-pip python3-devel gcc gcc-c++ make
Step 3: Create Virtual Environment
# Create project directory
mkdir ~/business-web-app
cd ~/business-web-app
# Create virtual environment
python3 -m venv venv
# Activate virtual environment
source venv/bin/activate
# Verify activation
which python
Step 4: Install Essential Packages
# Upgrade pip
pip install --upgrade pip
# Install Jupyter and essential libraries
pip install jupyter jupyterlab
# Install web development packages
pip install flask django fastapi streamlit
# Install data science packages
pip install pandas numpy matplotlib seaborn plotly
# Install database packages
pip install sqlalchemy psycopg2-binary pymongo
# Install additional utilities
pip install requests beautifulsoup4 python-dotenv
# Save requirements
pip freeze > requirements.txt
Day 1 Recap
Today, we set up our development environment for building business web applications using Python. We installed VSCode, configured essential extensions, and set up a virtual environment. We also explored the Jupyter notebook interface and created a simple web application, as well as installed essential libraries for data handling, visualization, and web development.
We learned how to create a project structure that is easy to navigate and maintain and also discussed best practices for managing dependencies, using virtual environments, and documenting our code. The importance of using version control with Git and keeping our requirements.txt file updated was discussed, and we learned how to use .env files to manage sensitive data and environment variables.
Discussing the importance of documenting our code and using comments to explain complex logic, we learned how to use MDX to create documentation files and how to use Jupyter notebooks to create interactive documentation. This setup provides a solid foundation for developing business web applications with Python and Jupyter Notebooks, we will discuss essential libraries across all major platforms in more depth in the coming days. Also, the face of AI development changes day to day and we will be updating this as we go along.