reflex-dev/agent-skills

setup-python-env

Set up a Python virtual environment and install Reflex.

查看源码

使用方法

  1. 复制安装命令,在自己的智能体环境安装前先检查源码包。
  2. 从原始文档核对所需工具、凭据和支持的宿主。
  3. 说明输入材料与期望交付物,并对照来源检查输出。
npx skills add https://github.com/reflex-dev/agent-skills --skill setup-python-env

开始前需了解

  • 安装不包含模型订阅、API 额度或访问文件的权限。
  • 仓库星数和安装量反映活跃情况,不等于独立质量或安全测试。
仓库原始内容

按源仓库内容呈现,保留标题、案例、代码、表格、链接以及原文引用的演示图片。

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:

bash
ls -d .venv 2>/dev/null

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

bash
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:

bash
uv --version

If uv is found:

  1. If no pyproject.toml exists, initialize one:
bash
   uv init --bare
  1. Create the virtual environment:
bash
   uv venv .venv
  1. Activate it:
bash
   source .venv/bin/activate

Skip to Step 3.

Option B: Fall back to python / pip

If uv is not available, check the Python version:

bash
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:
bash
   python3 -m venv .venv
  1. Activate it:
bash
   source .venv/bin/activate
  1. Upgrade pip:
bash
   pip install --upgrade pip

Step 3: Install Reflex

Check if Reflex is already installed:

bash
pip show reflex 2>/dev/null

If Reflex is not installed:

If using uv:

bash
uv add reflex

If using pip:

bash
pip install reflex

按任务相关推荐

来自同一仓库

更多 Skills

全部 Skills