Main Site ↗

nlp-research-repo-package-installment

by benchflow-ai890173GitHub

Align Python version and repo-declared dependencies (requirements.txt / environment.yml) before installing packages for NLP research code reproduction.

Unlock Deep Analysis

Use AI to visualize the workflow and generate a realistic output preview for this skill.

Powered by Fastest LLM

Development
Compatible Agents
Claude Code
Claude Code
~/.claude/skills/
Codex CLI
Codex CLI
~/.codex/skills/
Gemini CLI
Gemini CLI
~/.gemini/skills/
O
OpenCode
~/.opencode/skills/
O
OpenClaw
~/.openclaw/skills/
GitHub Copilot
GitHub Copilot
~/.copilot/skills/
Cursor
Cursor
~/.cursor/skills/
W
Windsurf
~/.codeium/windsurf/skills/
C
Cline
~/.cline/skills/
R
Roo Code
~/.roo/skills/
K
Kiro
~/.kiro/skills/
J
Junie
~/.junie/skills/
A
Augment Code
~/.augment/skills/
W
Warp
~/.warp/skills/
G
Goose
~/.config/goose/skills/
SKILL.md

NLP Research Repo Package Installment

When reproducing an NLP research repo, always align the environment to the repo’s declared dependencies first. Most failures come from Python version mismatch or installing packages without following requirements.txt / environment.yml.

What to do (must run before any install)

  1. Read the repo dependency files
  • Prefer environment.yml / environment.yaml (often pins Python + channels + non-pip deps)
  • Otherwise use requirements.txt (pip deps)
  • If both exist, treat environment.yml as the base, requirements.txt as supplemental unless README says otherwise
  1. Log the current environment (Python version is critical)
    Write /root/python_int.txt containing:
  • python -VV (required; Python version is often the root cause)
  • python -m pip --version
  • python -m pip freeze
  1. Compare & decide
  • If the repo expects a specific Python major/minor and the current Python does not match, it’s usually best to set up a matching environment before installing dependencies. Example: set up a fresh Python 3.11 environment (Docker / Ubuntu) with uv # Install uv apt-get update apt-get install -y --no-install-recommends curl ca-certificates rm -rf /var/lib/apt/lists/* curl -LsSf https://astral.sh/uv/0.9.7/install.sh | sh export PATH="/root/.local/bin:$PATH"

      # Install Python + create a venv
      uv python install 3.11.8
      uv venv --python 3.11.8 /opt/py311
    
      # Use the new Python for installs/runs
      /opt/py311/bin/python -VV
      /opt/py311/bin/python -m pip install -U pip setuptools wheel
    
  • Prefer installing from the repo’s dependency files (avoid random upgrades), then run a quick import/smoke test.

Source: https://github.com/benchflow-ai/SkillsBench#tasks-simpo-code-reproduction-environment-skills-nlp-research-repo-package-installment

Content curated from original sources, copyright belongs to authors

Grade B
-AI Score
Best Practices
Checking...
Try this Skill

User Rating

USER RATING

0UP
0DOWN
Loading files...

WORKS WITH

Claude Code
Claude
Codex CLI
Codex
Gemini CLI
Gemini
O
OpenCode
O
OpenClaw
GitHub Copilot
Copilot
Cursor
Cursor
W
Windsurf
C
Cline
R
Roo
K
Kiro
J
Junie
A
Augment
W
Warp
G
Goose