Localized reading guide
hf-cloud-python-env-setupPurpose, usage and source
Set up an isolated Python environment for SageMaker / AWS work, with the right Python version and current boto3. Use this skill whenever Python code will be executed for a SageMaker deployment, training job, or any AWS automation — including when about to run pip install, when about to invoke boto3, when creating or activating a virtualenv, or when the user asks to "set up the environment". Never use system Python and never pip install into it. Always isolate. This skill prevents the most common failure modes: wrong Python version, dependency conflicts, and stale SDKs.
Source retrieved:
- Source repository
- huggingface/skills
- SKILL.md
skills/hf-cloud-python-env-setup/SKILL.md- Repository stars
- 11,241
- Repository updated
- 2026-10-30
- Categories
- Cloud
- Last collected
License: Apache-2.0
Workflow excerpts are reading aids, not executable instructions from Codez. No third-party Skill was run to produce this page.
The purpose and workflow passages below are upstream material, organized and translated for reading. They are distinct from the separately labeled Codez editorial analysis.
What this Skill does
Set up an isolated Python environment for SageMaker / AWS work, with the right Python version and current boto3. Use this skill whenever Python code will be executed for a SageMaker deployment, training job, or any AWS automation — including when about to run pip install, when about to invoke boto3, when creating or activating a virtualenv, or when the user asks to "set up the environment". Never use system Python and never pip install into it. Always isolate. This skill prevents the most common failure modes: wrong Python version, dependency conflicts, and stale SDKs.
How the upstream workflow works
How to set up
The fastest path is the bundled script — it's Python, so it runs the same on Windows, macOS, and Linux: This script detects uv and uses it if available (faster), falls back to the stdlib venv module, creates .venv/ with Python 3.12 (override: python3 setup_env.py .venv 3.11), refuses unsupported Python versions, installs from the bundled requirements.txt, and is idempotent. It also prints the correct interpreter path for the host OS (see below). After setup, invoke the env's Python explicitly rather than activating the venv. The interpreter path differs by platform: This works the same in scripts, interactive shells, and agent tool calls. The rest of this skill writes .venv/bin/python for brevity — on Windows substitute .venv\Scripts\python.exe.
python3 scripts/setup_env.py # macOS / Linux
python scripts/setup_env.py # Windows (PowerShell / cmd)Requirements and setup
Python Environment Setup for SageMaker
Most SageMaker deployment failures that look like AWS problems are actually Python environment problems: wrong Python version, broken dependency resolution, stale SDK that doesn't know about a current API. This skill makes env setup boring and correct.
Upstream passage · L6 ↗Limits and quality checks
Common pitfalls
Mysterious pip install resolution errors Almost always Python 3.13+ trying to install packages without wheels yet, or installing into a polluted system Python. Recreate at 3.12: delete .venv and re-run python3 setup_env.py .venv 3.12 (the script recreates the env when the version doesn't match, so you can also just re-run it). pip install succeeded but the script says "module not found" You installed into a different interpreter than the one running the script. Always invoke Python explicitly: .venv/bin/python -m pip install ... and .venv/bin/python deploy.py.
Core rules
Never use the system Python. Always work inside an isolated environment. Pin the Python version, not the package versions. Use 3.10, 3.11, or 3.12. Avoid 3.13+ — ML libraries lag on wheel availability and dependency resolution breaks in confusing ways. Install the latest of each package. Don't defensively pin boto3 or awscli. Newer ones have current API surfaces and security fixes. Only pin if the user explicitly requires a specific version. Check installed versions correctly. Use importlib.metadata.version("package-name"), never module.__version__. The latter is inconsistent across packages.
Start with a safe trial
- Check the supported host and the repository installation instructions. Keep the Skill directory and its referenced scripts, assets and documentation together; SKILL.md alone may omit dependencies.
- Give the agent your real input, desired output and acceptance criteria. Invocation syntax and available tools depend on the host; this site does not assume a universal install command.
- Try the source workflow in a disposable project or on a copy. Review operations that change files, remote services or billable resources before allowing them.
- Validate the output against the source quality checks and your own requirements. A successful trigger or a high repository Star count does not establish a correct result.
Read further in the source
Related Skills
Translation and scope
This reading guide selects passages from the pinned upstream SKILL.md. Translation is assisted. It is not a complete manual or a claim of tested compatibility. Read the original and its referenced files before use.
This introduction refers to the pinned version below; current repository activity and collection time are shown separately.
- Pinned source
- Read the original ↗
- Source retrieved
- Source commit
fabc634a893f62ad5c2039830397efa35fa62715- Source SHA-256
c5d108b134dc5237ec63fbbb3200717853f2c5281ab33b7a2f1576b46a4d0fe8