xiao0916/lm-skills · Archived

venv-manager

自动管理 Python 虚拟环境。当?

First seen Mar 15, 2026

Installation

$ npx skills add xiao0916/lm-skills --skill venv-manager

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from xiao0916/lm-skills · top by installs.

npx skills add xiao0916/lm-skills

Browse all from xiao0916/lm-skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Also listed on

Alternate registries and mirrors of this skill.

Repository health

Default branch main
Open issues 0
Status Archived

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,769 B
  • docs SUMMARY.md 187 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 3 installs

SKILL.md

Python 虚拟环境管理器

用于管理 Python 虚拟环境的指南和工具。

何时使用

  • 技能需要安装 Python 依赖时
  • 执行需要隔离环境的 Python 脚本时
  • 避免全局 Python 环境被污染
  • 多个项目需要不同版本的依赖时

快速开始

# 1. 创建虚拟环境
python scripts/create-venv.py <path> [--python <version>]

# 2. 激活虚拟环境
source scripts/activate-venv.sh <path>

# 3. 安装依赖
pip install -r requirements.txt

工作流程

  1. 检查现有虚拟环境

- 检查 .venv/venv/ 目录是否存在 - 检查 .venv_path 文件中的路径

  1. 创建虚拟环境(如需要)

``bash python scripts/create-venv.py <path> ``

  1. 激活虚拟环境

``bash source scripts/activate-venv.sh <path> # 或使用 Python API python scripts/activate-venv.py --activate <path> ``

  1. 在虚拟环境中执行命令

- 所有 pip install 应在激活后执行 - 所有 Python 脚本应在激活后运行

  1. 清理(可选)

``bash python scripts/cleanup-venv.py <path> ``

参考文件

文件 用途
scripts/create-venv.py 创建新的虚拟环境
scripts/activate-venv.py 激活虚拟环境(Python API)
scripts/activate-venv.sh 激活虚拟环境(Shell 脚本)
scripts/cleanup-venv.py 清理/删除虚拟环境
references/venv-guide.md 虚拟环境管理最佳实践
references/common-issues.md 常见问题解决方案