Installation
This guide covers how to install Gradio on your system. We recommend using a virtual environment to keep your projects isolated and avoid dependency conflicts.Requirements
Python 3.10 or higher is required to use Gradio.
Quick install
The fastest way to install Gradio is using pip, which is included by default in Python:Virtual environments (recommended)
A virtual environment is a self-contained directory that holds a Python installation for a particular version of Python, along with additional packages. This keeps your projects isolated and prevents conflicts between different package versions.Benefits of virtual environments
- Work on multiple projects with different dependencies
- Avoid version conflicts between packages
- Simplify dependency management
- Enhance project reproducibility
Installation on Windows
Verify Python installation
Ensure you have Python 3.10 or higher installed. Open Command Prompt and run:If you need to install Python, download it from python.org.
Create a virtual environment
Navigate to your project directory in Command Prompt and create a virtual environment:This creates a new directory
gradio-env in your project folder containing a fresh Python installation.Activate the virtual environment
Activate the virtual environment:Your command prompt should now show
(gradio-env) at the beginning, indicating you’re working inside the virtual environment.Installation on macOS and Linux
Verify Python installation
Python usually comes pre-installed on macOS and most Linux distributions. Verify by running:Ensure you have Python 3.10 or higher. If not, download it from python.org.
Depending on your system, you may need to use
python3 instead of python throughout these steps.Create a virtual environment
Navigate to your project directory in Terminal and create a virtual environment:
Activate the virtual environment
Activate the virtual environment:Your terminal prompt should now show
(gradio-env) at the beginning.Alternative installation methods
Using conda
If you use Anaconda or Miniconda, you can install Gradio using conda:Gradio is not available directly through conda, so you still need to use pip after creating your conda environment.
Installing from source
To install the latest development version of Gradio from GitHub:Upgrading Gradio
To upgrade to the latest version of Gradio:Next steps
Now that you have Gradio installed, you’re ready to build your first app:Quickstart
Build your first Gradio app in minutes
Introduction
Learn more about what Gradio can do