Skip to content

SuvanD0/python-setup-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

🐍 Python Setup Test

A comprehensive testing notebook to verify Python, Conda, and package installations are working correctly.

🎯 Purpose

This repository contains a Jupyter notebook that tests:

  • Python installation and version
  • Conda environment management
  • Core scientific computing libraries
  • Machine learning libraries
  • Data visualization capabilities
  • A fun lightweight LLM demo!

🚀 Quick Start

Prerequisites

Installation

  1. Clone the repository:

    git clone <your-repo-url>
    cd python-setup-test
  2. Create and activate the conda environment:

    # Create the environment from the yml file
    conda env create -f environment.yml
    
    # Activate the environment
    conda activate python-setup-test
  3. Start Jupyter Notebook:

    jupyter notebook
  4. Open and run the notebook:

    • Open Python_Setup_Test.ipynb
    • Run all cells (Cell → Run All)

📦 What's Included

Environment (environment.yml)

  • Python 3.11
  • Core libraries: NumPy, Pandas, Matplotlib, Seaborn, Scikit-learn
  • ML libraries: PyTorch, Transformers, Accelerate
  • Jupyter and notebook support

Test Notebook (Python_Setup_Test.ipynb)

  • Test 1: Python version and environment check
  • Test 2: Core scientific computing libraries
  • Test 3: Machine learning libraries
  • Test 4: Fun data visualization demo
  • Test 5: Machine learning classification demo
  • Test 6: Lightweight LLM interaction demo

🎨 Features

Data Visualization

  • Beautiful sine wave plots
  • Scatter plots with color mapping
  • Histograms and distributions
  • Heatmaps using Seaborn

Machine Learning

  • Synthetic dataset generation
  • Random Forest classification
  • Performance metrics
  • Feature importance analysis

AI/LLM Demo

  • GPT-2 Medium model (~500MB)
  • High-quality text generation
  • Creative writing and storytelling
  • Fast and efficient - perfect balance of capability and speed

🛠️ Troubleshooting

Common Issues

  1. Environment not activating:

    conda activate python-setup-test
  2. Package import errors:

    conda list  # Check installed packages
    conda env create -f environment.yml --force  # Recreate environment
  3. LLM demo fails:

    • Check internet connection (model downloads ~500MB on first run)
    • The core tests will still work if LLM demo fails
    • Falls back to GPT-2 Small if Medium fails
  4. Jupyter not starting:

    conda install jupyter
    jupyter notebook

Manual Package Installation

If the environment creation fails, install packages manually:

conda activate python-setup-test
conda install python=3.11 numpy pandas matplotlib seaborn scikit-learn jupyter
pip install torch transformers accelerate

📝 Customization

Adding More Tests

Edit Python_Setup_Test.ipynb to add your own tests:

  • Add new library imports
  • Create custom visualizations
  • Test specific functionality

Modifying Environment

Edit environment.yml to:

  • Change Python version
  • Add/remove packages
  • Modify package versions

🤝 Contributing

Feel free to:

  • Add more test cases
  • Improve the visualizations
  • Add more ML demos
  • Enhance the LLM interaction

📄 License

This project is open source and available under the MIT License.

🎉 Success!

If all tests pass, your Python setup is working perfectly! You're ready to start your data science and machine learning journey.

Happy coding! 🐍✨

About

Python setup testing notebook with conda installation instructions for Windows (Command Prompt & PowerShell), macOS, and Linux

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors