Reflex requires Python 3.7+ to get started.
For Windows users, we recommend using Windows Subsystem for Linux (WSL) for optimal performance.
For macOS users with Apple M1 or M2 chips, you may need to install Rosetta 2 to run Reflex. This can be done with the following command:
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
We recommend creating a virtual environment for your project.
Below are some tools you can use to manage environments:
Reflex is available as a pip package.
pip install reflex
Installing Reflex also installs the reflex
command line tool.
Test that the install was successful by creating a new project. Replace my_app_name
with your project name:
$ mkdir my_app_name $ cd my_app_name $ reflex init
This initializes a template app in your new directory.
You can run this app in development mode:
$ reflex run
You should see your app running at http://localhost:3000.
Reflex has fast refreshes when running in development mode. You can modify the source code in my_app_name/my_app_name.py
and see your changes in the browser instantly when you save your code.
You can debug your app by setting the --loglevel
flag on any reflex command.
$ reflex run --loglevel debug