A fully-featured, advanced Python IDE for Android built with Flutter. This app provides a complete Linux environment on Android, enabling the installation and execution of heavy Python modules including AI/ML libraries like PyTorch, TensorFlow, Transformers, and llama.cpp.
- Code Editor: Syntax highlighting, auto-completion, line numbers, word wrap
- File Explorer: Project management with create, open, save, delete operations
- Integrated Terminal: Full bash access to the Linux environment
- Output Console: Real-time script execution output
- Project Management: Multiple project support with persistent storage
- Complete Linux Distribution: Alpine Linux or Ubuntu via proot
- Python 3.10+: Full Python installation with pip package management
- Native Compilation: Support for C/C++ extensions required by ML libraries
- Isolated Environment: Sandboxed Linux environment for safety
- PyTorch: Run deep learning models
- TensorFlow: Machine learning workflows
- Transformers: Hugging Face model support
- llama.cpp: Local LLM inference with .gguf models
- NumPy, Pandas, Matplotlib: Data science essentials
- Material Design 3: Modern, responsive UI
- Light/Dark Themes: Automatic system theme detection
- Offline Capable: Work without internet after initial setup
- Performance Optimized: Lag-free editing and execution
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Flutter UI Layer β
β ββββββββββββ ββββββββββββ ββββββββββββ ββββββββββββ β
β β Editor β β Explorer β β Terminal β β Output β β
β ββββββββββββ ββββββββββββ ββββββββββββ ββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
Platform Channel
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Android Native Layer β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β MainActivity (Kotlin) β β
β β - Download & Extract Linux Rootfs β β
β β - Process Management β β
β β - File System Operations β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Linux Environment β
β ββββββββββββ ββββββββββββ ββββββββββββ ββββββββββββ β
β β Python β β pip β β gcc/clangβ β bash β β
β ββββββββββββ ββββββββββββ ββββββββββββ ββββββββββββ β
β ββββββββββββ ββββββββββββ ββββββββββββ ββββββββββββ β
β β PyTorch β βTensorFlowβ βllama.cpp β β NumPy β β
β ββββββββββββ ββββββββββββ ββββββββββββ ββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
lib/
βββ main.dart # App entry point
βββ core/ # Core utilities
βββ models/ # Data models
β βββ project.dart
β βββ linux_environment.dart
βββ providers/ # State management
β βββ theme_provider.dart
β βββ linux_environment_provider.dart
β βββ project_provider.dart
β βββ editor_provider.dart
β βββ terminal_provider.dart
βββ services/ # Business logic
β βββ linux_environment_service.dart
βββ screens/ # UI screens
β βββ splash_screen.dart
β βββ setup_screen.dart
β βββ main_screen.dart
β βββ project_screen.dart
β βββ settings_screen.dart
β βββ package_manager_screen.dart
β βββ model_manager_screen.dart
βββ widgets/ # Reusable widgets
βββ file_explorer.dart
βββ code_editor.dart
βββ terminal_panel.dart
βββ output_panel.dart
android/
βββ app/
βββ src/
βββ main/
βββ kotlin/
βββ com/pythonide/
βββ MainActivity.kt # Platform channel implementation
- Flutter SDK 3.0+
- Android SDK
- Kotlin 1.9+
- Android Studio or VS Code
-
Clone the repository
git clone https://github.com/yourusername/python-ide-android.git cd python-ide-android -
Install dependencies
flutter pub get
-
Configure Android
- Open
android/local.propertiesand add:flutter.sdk=/path/to/flutter sdk.dir=/path/to/android/sdk
- Open
-
Build the app
flutter build apk --release
-
Install on device
flutter install
- Launch the app
- Complete the setup wizard to download the Linux environment
- Choose between Alpine Linux (smaller) or Ubuntu (full-featured)
- Wait for the environment to download and install (~150-500MB)
- Start coding!
- Tap the "+" button in the Projects screen
- Enter a project name
- The app creates a project with a
main.pyfile
- Select a file from the file explorer
- Use the code editor with syntax highlighting
- Press Ctrl+S (or use the save button) to save
- Open a Python file
- Tap the "Run" button (play icon)
- View output in the Output panel
- Navigate to the Packages tab
- Search for a package or select from quick install
- Tap install and wait for completion
- Open the Terminal panel
- Type bash commands
- Use
pip3to manage packages - Use
python3to run scripts
- Import a .gguf model file (from Hugging Face or other sources)
- Go to the Models tab
- Tap "Run" on your model
- Enter prompts in the inference panel
- numpy, pandas, scipy
- matplotlib, seaborn, plotly
- scikit-learn
- torch, torchvision, torchaudio
- tensorflow, keras
- jax, flax
- transformers, tokenizers
- datasets, accelerate
- llama-cpp-python
- flask, django, fastapi
- requests, aiohttp
- sqlalchemy
- pillow, opencv-python
- pyyaml, toml
- pytest, black, flake8
- Base: Alpine Linux 3.19 or Ubuntu 22.04
- Container: proot-based user-space chroot
- Size: ~150MB (Alpine) to ~500MB (Ubuntu)
- Python: 3.10+ with pip
- Uses proot for non-root Linux environment
- Optimized for ARM64 (primary Android architecture)
- Background execution for long-running tasks
- Memory management for large models
- Sandboxed Linux environment
- No root access required
- Isolated file system
- Network permissions for package downloads only
- Check internet connection
- Ensure sufficient storage space (1GB+)
- Try switching to a different distribution
- Some packages require compilation tools
- Install
build-base(Alpine) orbuild-essential(Ubuntu) - Check package compatibility with ARM architecture
- Close other apps
- Use smaller models (Q4_K_M quantization)
- Reduce batch sizes in ML scripts
- Use Alpine Linux for lighter footprint
- Close unused panels
- Enable word wrap for large files
- Create provider in
lib/providers/ - Add UI in
lib/screens/orlib/widgets/ - Update platform channel in
MainActivity.ktif needed
downloadAndExtract: Download and extract Linux rootfsexecuteCommand: Run commands in Linux environmentisEnvironmentReady: Check environment status
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
MIT License - see LICENSE file for details
- Flutter team for the amazing framework
- proot developers for the Linux environment solution
- llama.cpp project for local LLM inference
- Hugging Face for transformer models
For issues and feature requests, please use the GitHub issue tracker.
Note: This app requires Android 7.0+ (API level 24) and approximately 1GB of free storage for the Linux environment.