A comprehensive, cross-platform Python development environment designed for UPS M1 SGM programming coursework. Works seamlessly on macOS, Linux, and Windows.
This repository provides a ready-to-use Python development environment that works consistently across different operating systems, perfect for academic coursework where you might need to work on:
- π Personal Mac (with Terminal and IntelliJ)
- π§ Linux systems (university servers, personal installations)
- π» Windows computers (school labs with Emacs)
git clone <your-repo-url>
cd python-dev-env
./check_platform.sh # Check system compatibility
./setup_env.sh # Automatic setup# macOS/Linux
source activate_env.sh
# Windows Command Prompt
activate_env.batpython src/example.py # Run example
pytest tests/ # Run tests
jupyter notebook # Start Jupyter- Automatic OS detection (macOS, Linux distributions, Windows)
- Smart Python detection (python3, python, py commands)
- Platform-specific installation guides
- Consistent workflow across all systems
- Testing: pytest with example test suite
- Code Quality: black (formatter) + flake8 (linter)
- Interactive Development: Jupyter notebooks
- Data Science: numpy, pandas, matplotlib
- Web Development: requests library
setup_env.sh- Universal environment setupactivate_env.sh- Enhanced activation (Unix)activate_env.bat- Windows activationcheck_platform.sh- System diagnostics
python-dev-env/
βββ π Scripts
β βββ activate_env.sh # Unix activation
β βββ activate_env.bat # Windows activation
β βββ setup_env.sh # Universal setup
β βββ check_platform.sh # Platform diagnostics
βββ π Documentation
β βββ README.md # Main documentation
β βββ CROSS_PLATFORM_GUIDE.md # Detailed platform guide
βββ π Python Code
β βββ src/
β β βββ example.py # Example Python script
β βββ tests/
β β βββ test_example.py # Unit tests
β βββ example_notebook.ipynb # Jupyter example
βββ βοΈ Configuration
βββ requirements.txt # Python dependencies
βββ .gitignore # Git ignore rules
- Shells: zsh (default), bash
- IDEs: IntelliJ IDEA, PyCharm, VS Code
- Package Manager: Homebrew compatible
- Architecture: Intel & Apple Silicon (M1/M2/M3)
- Distributions: Ubuntu, Debian, CentOS, RHEL, Fedora, Arch
- Package Managers: apt, yum, dnf, pacman
- Desktop Environments: GNOME, KDE, XFCE, i3
- Editors: Emacs, Vim, VS Code
- Native: Command Prompt, PowerShell
- Unix-like: WSL, Git Bash, Cygwin
- IDEs: VS Code, PyCharm, Emacs
- Terminals: Windows Terminal, ConEmu
sudo apt update
sudo apt install python3 python3-venv python3-pip build-essentialsudo dnf install python3 python3-venv python3-pip gcc gcc-c++ make# Install Homebrew (if not installed)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install python- Download Python from python.org
- Or install from Microsoft Store
- Consider using WSL for better compatibility
# Activate environment
source activate_env.sh
# Install additional packages
pip install requests beautifulsoup4
# Update requirements
pip freeze > requirements.txt
# Format code
black src/
# Check code style
flake8 src/
# Run tests
pytest tests/ -v
# Start Jupyter for data analysis
jupyter notebook# Check your system setup
./check_platform.sh
# Platform-specific activation:
source activate_env.sh # macOS/Linux
activate_env.bat # Windows CMD
source activate_env.sh # Git Bash/WSLThe environment includes a comprehensive test suite:
# Run all tests
pytest tests/
# Run with coverage
pytest tests/ --cov=src
# Run specific test
pytest tests/test_example.py::test_basic_statistics -vEnvironment not activating?
./check_platform.sh # Check system status
./setup_env.sh # Recreate environmentPython not found?
- macOS:
brew install python - Linux:
sudo apt install python3(or equivalent) - Windows: Download from python.org
Permission errors on Linux?
chmod +x *.shSee detailed troubleshooting guide for platform-specific solutions.
README.md- Comprehensive usage guideCROSS_PLATFORM_GUIDE.md- Platform-specific features- Example Notebook - Jupyter tutorial
This is a personal academic repository, but feel free to:
- Fork for your own coursework
- Adapt for different subjects
- Suggest improvements via issues
This project is licensed under the MIT License - see the LICENSE file for details.
Created for UniversitΓ© Paris Saclay (UPS) M1 SGM programming coursework. Designed to provide a consistent development environment across different computing environments encountered in academic settings.
Happy Coding! π
"Write once, run everywhere" - now for Python development environments too!