pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/nmadan/sagemaker-python-sdk/blob/master/docs/installation.rst

f58ad7b2.css" /> sagemaker-python-sdk/docs/installation.rst at master · nmadan/sagemaker-python-sdk · GitHub
Skip to content

Latest commit

 

History

History
150 lines (97 loc) · 3.45 KB

File metadata and controls

150 lines (97 loc) · 3.45 KB

Installation

This guide covers how to install SageMaker Python SDK V3 and set up your development environment.

Quick Installation

Install the latest version of SageMaker Python SDK V3:

pip install sagemaker

Prerequisites

Python Version
SageMaker Python SDK V3 supports Python 3.9, 3.10, 3.11, and 3.12
Operating Systems
  • Linux
  • macOS

Installation Methods

Standard Installation

Install the complete SageMaker Python SDK V3:

pip install sagemaker

Modular Installation

Install specific components based on your needs:

# Core functionality only
pip install sagemaker-core

# Training capabilities
pip install sagemaker-train

# Inference capabilities
pip install sagemaker-serve

# ML Operations
pip install sagemaker-mlops

Virtual Environment (Recommended)

Create an isolated environment for your SageMaker projects:

# Using venv
python -m venv sagemaker-v3-env
source sagemaker-v3-env/bin/activate
pip install sagemaker

# Using conda
conda create -n sagemaker-v3 python=3.10
conda activate sagemaker-v3
pip install sagemaker

Development Installation

Install the SageMaker Python SDK directly from source when you want to:

  • develop locally,
  • test your own modifications, or
  • work with the latest unreleased features.
git clone https://github.com/aws/sagemaker-python-sdk.git
cd sagemaker-python-sdk
pip install -e .

This installs the top-level sagemaker package in editable mode, so any changes you make to its code are picked up immediately without needing to reinstall.

Working with SDK Submodules

The repository contains additional installable components such as:

  • sagemaker-core
  • sagemaker-train
  • sagemaker-serve
  • sagemaker-mlops

If you plan to modify code inside one of these packages, install that submodule in editable mode as well:

cd sagemaker-core
pip install -e .

Repeat for any other submodule you are actively developing.

Editable installations operate at the Python package level, not the Git repository level. Installing the relevant submodule ensures your local changes are reflected during development.

Verification

Verify your installation:

from sagemaker.core.helper.session_helper import Session
from importlib.metadata import version
print(f"SageMaker SDK version: {version('sagemaker')}")

session = Session()
print(f"Default bucket: {session.default_bucket()}")
print(f"Region: {session.boto_region_name}")

Upgrading from V2

If you have SageMaker Python SDK V2 installed:

# Upgrade to V3
pip install --upgrade sagemaker

# Or install V3 in a new environment (recommended)
python -m venv sagemaker-v3-env
source sagemaker-v3-env/bin/activate
pip install sagemaker

Note: V3 introduces breaking changes. See the :doc:`overview` page for migration guidance.

Next Steps

After installation:

  1. Configure AWS credentials if you haven't already
  2. Read the :doc:`overview` to understand V3 changes
  3. Try the :doc:`quickstart` guide
  4. Explore :doc:`training/index`, :doc:`inference/index`, and other capabilities
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy