Skillsbench nlp-research-repo-package-installment
Align Python version and repo-declared dependencies (requirements.txt / environment.yml) before installing packages for NLP research code reproduction.
git clone https://github.com/benchflow-ai/skillsbench
T=$(mktemp -d) && git clone --depth=1 https://github.com/benchflow-ai/skillsbench "$T" && mkdir -p ~/.claude/skills && cp -r "$T/tasks/simpo-code-reproduction/environment/skills/nlp-research-repo-package-installment" ~/.claude/skills/benchflow-ai-skillsbench-nlp-research-repo-package-installment && rm -rf "$T"
tasks/simpo-code-reproduction/environment/skills/nlp-research-repo-package-installment/SKILL.mdNLP 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)
- Read the repo dependency files
- Prefer
/environment.yml
(often pins Python + channels + non-pip deps)environment.yaml - Otherwise use
(pip deps)requirements.txt - If both exist, treat
as the base,environment.yml
as supplemental unless README says otherwiserequirements.txt
- Log the current environment (Python version is critical)
Write
containing:/root/python_int.txt
(required; Python version is often the root cause)python -VVpython -m pip --versionpython -m pip freeze
- 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.