mcpField
S
setup-python-env

setup-python-env

github.com/reflex-devDevelopment20683 installsUpdated 20w ago
Repository

About setup-python-env

setup-python-env is a skill for preparing a Python environment and installing Reflex. It checks for an existing virtual environment, selects uv or Python/pip setup steps, and requires Python 3.10 or newer for the fallback path.

Key features

  1. 01Existing .venv detection
  2. 02uv-based environment setup
  3. 03Python and pip fallback
  4. 04Python version check
  5. 05Reflex installation

Use cases

  1. 01Preparing a project environment for Reflex
  2. 02Setting up a virtual environment with uv
  3. 03Installing Reflex when it is absent

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/reflex-dev/agent-skills --skill setup-python-env

After installing, type/setup-python-envin Claude Code to confirm it loaded.

Details

From the project README

Python Environment Setup for Reflex

This skill handles creating a Python virtual environment and installing Reflex.

Step 1: Check for an existing virtual environment

Look for a .venv directory in the project root:

ls -d .venv 2>/dev/null

If .venv exists, activate it and skip to Step 3.

source .venv/bin/activate

Step 2: Create the virtual environment

If no .venv exists, determine which tools are available.

Option A: uv is available

Check if uv is installed:

uv --version

If uv is found:

  1. If no pyproject.toml exists, initialize one:

    uv init --bare
    
  2. Create the virtual environment:

    uv venv .venv
    
  3. Activate it:

    source .venv/bin/activate
    

Skip to Step 3.

Option B: Fall back to python / pip

If uv is not available, check the Python version:

python3 --version

If the version is older than 3.10, stop and inform the user:

Python 3.10 or newer is required. Please install a more up-to-date version of Python before continuing.

If the version is 3.10 or newer:

  1. Create the virtual environment:

    python3 -m venv .venv
    
  2. Activate it:

    source .venv/bin/activate
    
  3. Upgrade pip:

    pip install --upgrade pip
    

Step 3: Install Reflex

Check if Reflex is already installed:

pip show reflex 2>/dev/null

If Reflex is not installed:

If using uv:
uv add reflex
If using pip:
pip install reflex

Comments

Markdown supported