sagemaker-python-sdk icon indicating copy to clipboard operation
sagemaker-python-sdk copied to clipboard

AttributeError: module 'sagemaker' has no attribute 'Session'

Open yinw1590 opened this issue 1 month ago • 1 comments

你好 我尝试sagemaker jupyter notebook。

%pip install --quiet --upgrade transformers datasets sagemaker s3fs import sagemaker sess = sagemaker.Session() 发现就不可以,报错 AttributeError: module 'sagemaker' has no attribute 'Session'

yinw1590 avatar Nov 24 '25 03:11 yinw1590

Sagemaker Python SDK recently launched a new major version (version 3.0.0) which has changed the structure of Python SDK. You can pin the version of sagemaker to be strictly less than 3.0 to retrieve the Session class from sagemaker (and fix the error you are currently encountering).

aviruthen avatar Nov 24 '25 19:11 aviruthen