【以下的问题经过翻译处理】 我尝试跟着教程在我的本地Linux虚拟机中使用AWS Sagemaker的脚本模式,但我甚至不能让基础功能工作。
步骤:
Python 3.6.9
- ➜ ~> pip3 install sagemaker
...
Successfully installed boto3-1.14.42 botocore-1.17.42 importlib-metadata-1.7.0 packaging-20.4 protobuf3-to-dict-0.1.5 s3transfer-0.3.3 sagemaker-2.3.0 smdebug-rulesconfig-0.1.4 zipp-3.1.0
➜ ~> cat sagemaker.py
import sagemakerimport boto3
sess = sagemaker.Session()
➜ ~~> python3 sagemaker.py
Traceback (most recent call last):
File "sagemaker.py", line 1, in <module>
import sagemaker
File "~~/sagemaker.py", line 4, in <module>
sess = sagemaker.Session()
AttributeError: module 'sagemaker' has no attribute 'Session'
我也安装了aws cli (version 2) ,并使用具有完全权限的IAM凭据进行配置,所以与此无关。
我的Python SDK安装有问题吗?谢谢。