Install any skill in seconds. Free to start, no credit card required.
Get Started Free →waybarrios/hf-cloud-python-env-setup
Set up an isolated Python environment for SageMaker / AWS work, with the right Python version and current boto3.
Passed 21 of 22 test cases with the skill, and 9 of 22 without it.
and 13 more in the full report
12 fixed9 passed either way1 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 12 test cases the skill fixed. Same model, same prompt, with and without the skill.
What is the correct relative file path to the Python executable when invoking a virtual environment script on Windows systems?
| Checked | Without skill | With skill |
|---|---|---|
| Uses the file path .venv\Scripts\python.exe | Missed | Passed |
The instructions your model reads when the skill loads.
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.
boto3 or awscli. Newer ones have current API surfaces and security fixes. Only pin if the user explicitly requires a specific version.importlib.metadata.version("package-name"), never module.__version__. The latter is inconsistent across packages.boto3 directly. The SageMaker Python SDK is a valid alternative — see "boto3 vs the SageMaker SDK" below.The bundled deploy scripts (deploy.py, deploy_async.py, teardown.py) use boto3 directly and read image URIs from AWS's published Deep Learning Containers catalog. That fits this workflow's explicit-stages design — each skill produces a concrete value (region, role ARN, image URI) that the next one consumes — and boto3 is the stable underlying API client.
The SageMaker Python SDK (v3) is fine to use when the user prefers it or their project already does. Since PR #5960 (June 2026), ModelBuilder auto-routes HuggingFace models to the current containers (text-generation → HuggingFace vLLM, multimodal → vLLM-Omni, embeddings → TEI). Don't avoid the SDK over stale-image or wrong-container concerns — that routing is fixed.
Two specific SDK cases that still need care:
text-ranking task to TEI unconditionally, which is wrong for causal-LM rerankers like Qwen3-Reranker — those need vLLM (see hf-cloud-serving-image-selection). Pass the container explicitly for these models.ModelTrainer / FrameworkProcessor under SSO profiles. If SDK calls fail with credential errors while aws sts get-caller-identity succeeds in the same shell, suspect this rather than your AWS config.If you use the SDK, install it into the isolated env like everything else (.venv/bin/python -m pip install sagemaker). The bundled scripts don't require it.
The fastest path is the bundled script — it's Python, so it runs the same on Windows, macOS, and Linux:
python3 scripts/setup_env.py # macOS / Linux
python scripts/setup_env.py # Windows (PowerShell / cmd)
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).
Manual equivalent:
# Preferred: uv
test cases passed, vs 9 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.