A comprehensive testing notebook to verify Python, Conda, and package installations are working correctly.
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!
- Conda - Download and install from the official website
- Windows (Command Prompt): Miniconda for Windows
- Windows (PowerShell): Miniconda for Windows PowerShell
- macOS: Miniconda for macOS
- Linux: Miniconda for Linux
- Git (for cloning)
-
Clone the repository:
git clone <your-repo-url> cd python-setup-test
-
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
-
Start Jupyter Notebook:
jupyter notebook
-
Open and run the notebook:
- Open
Python_Setup_Test.ipynb - Run all cells (Cell → Run All)
- Open
- Python 3.11
- Core libraries: NumPy, Pandas, Matplotlib, Seaborn, Scikit-learn
- ML libraries: PyTorch, Transformers, Accelerate
- Jupyter and notebook support
- 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
- Beautiful sine wave plots
- Scatter plots with color mapping
- Histograms and distributions
- Heatmaps using Seaborn
- Synthetic dataset generation
- Random Forest classification
- Performance metrics
- Feature importance analysis
- GPT-2 Medium model (~500MB)
- High-quality text generation
- Creative writing and storytelling
- Fast and efficient - perfect balance of capability and speed
-
Environment not activating:
conda activate python-setup-test
-
Package import errors:
conda list # Check installed packages conda env create -f environment.yml --force # Recreate environment
-
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
-
Jupyter not starting:
conda install jupyter jupyter notebook
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 accelerateEdit Python_Setup_Test.ipynb to add your own tests:
- Add new library imports
- Create custom visualizations
- Test specific functionality
Edit environment.yml to:
- Change Python version
- Add/remove packages
- Modify package versions
Feel free to:
- Add more test cases
- Improve the visualizations
- Add more ML demos
- Enhance the LLM interaction
This project is open source and available under the MIT License.
If all tests pass, your Python setup is working perfectly! You're ready to start your data science and machine learning journey.
Happy coding! 🐍✨