✨ Announcing our seed funding led by Lux Capital! Read more about it on our blog
DocsBlogChangelog

Search documentation...

/

Star

12k+

[ Learn ]

[ Concepts ]

[ Reference ]

Installation

Prerequisites

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

Virtual Environment (Optional)

We recommend creating a virtual environment for your project.

Below are some tools you can use to manage environments:

  • venv
  • poetry

Installing

Reflex is available as a pip package.

pip install reflex

Create a Project

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.

Run the App

You can run this app in development mode:

$ reflex run

You should see your app running at http://localhost:3000.

Fast Refresh

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.

Debugging

You can debug your app by setting the --loglevel flag on any reflex command.

$ reflex run --loglevel debug
← IntroductionProject Structure →

Copyright © 2023 Pynecone, Inc.