Install and configure the Anaconda python distribution, VS Code with Python/Jupyter extensions, manage conda virtual environments, and verify the numerical toolchain inside a VirtualBox Linux VM.
Environment
VirtualBox / Linux (Ubuntu)
Difficulty
Beginner (1/5)
Course Module
Introduction to AI & ML
Deliverables
Imports & Version Verification Plot
1. System Architecture & Process Workflow
The diagram below outlines the virtualized sandbox runtime stack. It illustrates how the host computer runs VirtualBox to manage a Linux VM container, which in turn manages isolated Conda environments housing our Python packages, rendering interfaces locally via VS Code and Jupyter Notebook.
2. Part 1: Step-by-Step Action Items & Key Execution Steps
STEP 1
Boot Ubuntu Virtual Machine inside VirtualBox
Launch your guest operating system environment in Oracle VM VirtualBox and access the user desktop shell.
Launch Oracle VM VirtualBox -> Click Ubuntu VM -> Click Green "Start" Arrow -> Enter Credentials
This action initializes the hardware hypervisor, spins up the virtual hard disk, boots Ubuntu Linux Kernel, and presents the graphical login session.
STEP 2
Open the Ubuntu Linux Shell Terminal
Trigger the command-line interface to begin configuring system dependencies and software installers.
Click bottom-left Application Menu -> Search "terminal" -> Click "Terminal" Icon (or press Ctrl + Alt + T)
This action opens the bash command console emulator, providing root administrative command control over the Linux guest system.
STEP 3
Update Local Linux Repositories and Utilities
Download refreshed package indexes from Ubuntu servers to ensure secure and compatible tool installations.
This command retrieves the Anaconda installer shell script via HTTP and saves it locally in the home folder as an executable utility.
STEP 5
Execute Anaconda Installation and Initialize Conda
Run the downloaded installer script, accept the license agreements, specify directories, and bootstrap the shell profile.
$ bash ~/anaconda-installer.sh
This command invokes the installer shell script. Follow these prompt steps to complete the installation:
1. Press Enter: When the terminal shows "Welcome to Anaconda3", press the **Enter** key to start reading the terms.
2. Press Spacebar: Tap the **Spacebar** repeatedly to page down through the End User License Agreement (EULA).
3. Type "yes": Once the terms are fully displayed, type **yes** and press **Enter** to accept.
4. Press Enter for Location: Press **Enter** to confirm the default folder path (`/home/your_user/anaconda3`).
5. Type "yes" for Init: When asked if you want to run `conda init` to update your shell startup scripts, type **yes** and press **Enter**.
STEP 6
Refresh the Active Shell Environment
Reload bash configuration properties so the terminal session recognizes the new conda executable paths immediately.
$ source ~/.bashrc
This command parses and updates the environmental parameters of the current session, enabling command auto-completion and access to the conda package manager.
STEP 7
Install Visual Studio Code Editor via Snap
Install VS Code in Ubuntu utilizing snap containers to handle desktop integrations automatically.
$ sudo snap install --classic code
This command downloads and configures Visual Studio Code with classic confinement permissions, ensuring full file access inside the desktop shell.
STEP 8
Configure VS Code Python & Jupyter Extensions
Open the editor, navigate the marketplace interface, and enable python/notebook debugging features.
Launch VS Code -> Click Extensions Icon in Left Sidebar -> Search "Python" -> Click "Install" -> Search "Jupyter" -> Click "Install"
This GUI sequence installs language engines and notebook parsers inside VS Code, allowing interactive block-by-block coding.
STEP 9
Create the Dedicated ds_ai_ml Virtual Environment
Instantiate an isolated workspace directory with a custom Python version to protect the course tools from system configuration shifts.
$ conda create -n ds_ai_ml python=3.10 -y
This command instructs conda to create a new sandbox environment named `ds_ai_ml` running Python version 3.10 without waiting for a confirmation prompt.
STEP 10
Activate Workspace and Install Target Data Libraries
Move the shell pointer into the new virtual sandbox and install numpy, pandas, matplotlib, and jupyter.
This command points the terminal session to the new environment and pulls stable package binary files into the isolated local library cache.
STEP 11
Launch and Verify Jupyter Notebook in Firefox
Start the notebook web server container, open Firefox, launch a notebook, and test software imports.
$ jupyter notebook --no-browser
This command starts the local web server hosting Jupyter. Follow these steps to verify:
1. Copy Server Token: Locate the terminal lines containing `http://localhost:8888/?token=...`. Highlight and copy this address.
2. Open Firefox: Click the Firefox web browser icon in the Ubuntu dock.
3. Access Dashboard: Paste the copied link in the URL address bar and press **Enter**.
4. Create Notebook: Click the **New** dropdown button in the upper right, and choose **Python 3 (ipykernel)**.
5. Enter & Execute Test: Paste the verification script inside the first cell and press **Shift + Enter** to execute.
STEP 12
Connect VS Code to the Conda Python Kernel
Load the project directory in VS Code, create a jupyter file, select the active sandbox engine, and run test cells.
This configuration binds VS Code to our isolated conda python engine, allowing notebook execution directly from the IDE window.
3. Operational Pipeline Architecture
The flow chart below traces the automated installation sequence, demonstrating transitions from updating local OS repositories to installing Anaconda, setting up the isolated environment, and executing code verification.
4. Part 2: Complete Deliverable Assets & Production Templates
To verify that all libraries (NumPy, Pandas, Matplotlib) are installed correctly, we will build a Python verification script. Below is a line-by-line explanation of the code, followed by the combined script.
Step-by-Step Code Construction
Lines 1 - 2
Import Core System Libraries
Include system diagnostics library to print version information.
import sys
import os
These imports check system paths, fetch directory configurations, and output the exact active Python interpreter details.
Lines 3 - 5
Import Data Science Libraries
Import NumPy, Pandas, and Matplotlib to confirm they reside in our conda path.
import numpy as np
import pandas as pd
import matplotlib
import matplotlib.pyplot as plt
These commands verify packages are correctly loaded from active environment paths, throwing errors if any library is missing.
Lines 6 - 9
Print Environment Diagnostic Versions
Print the active runtime compiler build and version string details of all modules.