Quick Start: Installing Dependencies via UI
The easiest way to install dependencies is through the Mage UI:
Steps:
- Navigate to the Terminal page in your Mage workspace
-
Open
requirements.txt: Browse to/home/src/[project_path]/requirements.txtand click to open it in the editor -
Add your packages: Edit the file to include your dependencies
-
Click the “Install dependencies” button: This will automatically:
- Open a terminal at the bottom of the page
- Run
mage deps installcommand - Show real-time installation progress
- Install only the packages that need to be added or updated
Your dependencies are now installed and ready to use - no cluster restart required!
How It Works
Behind the scenes, Mage Pro’s dependency management system:- Creates isolated virtual environments for each unique combination of dependencies
- Caches and reuses environments based on content fingerprinting for faster installation
- Intelligently filters packages to reuse compatible packages from the global environment
- Uses
uvfor fast installation with automatic fallback topip - Automatically activates environments when the server starts
requirements.txt, ensuring your dependencies are always synchronized.
Alternative Methods
Via Mage Terminal
You can also run dependency commands directly in the Mage terminal:Automatic on Cluster Restart
When you restart your Mage cluster, dependencies are automatically installed based on yourrequirements.txt - no manual intervention needed.