Recommended Tools and Setup for Lab
Recommended Tools
Core Stack
| Tool | Purpose |
|---|---|
| Python | Main language |
| Jupyter Notebook | Interactive lab work |
| NumPy | Numerical computation |
| Pandas | Data handling |
| Matplotlib / Seaborn | Visualization |
| Scikit-learn | ML algorithms |
Advanced Tools
| Tool | Use |
|---|---|
| Google Colab | No-install lab |
| Kaggle Notebooks | datasets + practice |
| TensorFlow / PyTorch | neural networks |
| Streamlit | mini project deployment |
Best Offline Setup (Recommended)
Use Anaconda (Easiest)
This is the best choice for students.
🔹 Steps:
- Download Anaconda from https://www.anaconda.com/download
- Install it
-
It includes:
- Python
- Jupyter Notebook
- NumPy, Pandas, Matplotlib
- Open Jupyter Notebook
- Start coding ML programs
👉 No need to install packages separately
Two Main Ways to Manage Python Packages
✅ Method 1: Using pip (Standard)
- Comes with Python
- Simple and widely used
✅ Method 2: Using conda (Recommended for ML)
- Comes with Anaconda
- Better for handling dependencies
👉 Recommendation:
Use conda for teaching labs, pip for basic usage
Installing Packages (Step-by-Step)
🔹 Using pip
Install specific version:
🔹 Using conda
👉 Automatically handles compatibility (very useful for students)
Creating Separate Environments (VERY IMPORTANT)
👉 Avoids “it works on my system” problems
🔹 Using conda (Best method)
Create environment:
Activate:
Install packages:
🔹 Using pip (venv)
Activate:
- Windows:
- Linux/Mac:
Then install:
💡 Why environments matter
Without environments:
- Package conflicts ❌
- Version issues ❌
- Broken code ❌
With environments:
- Clean setup ✅
- Reproducibility ✅
- Easy grading ✅
Keeping Track of Packages
🔹 Export environment (important for labs)
pip:
conda:
🔹 Install from file
pip:
conda:
👉 This is very useful for distributing lab setups to students
Updating Packages
pip:
conda:
Removing Packages
pip:
conda:
Comments
Post a Comment