I am attempting to perform pre-processing using sklearn in sagemaker. As a pre-requisite I am trying to import sagemaker module:
%pip install -qU 'sagemaker>=2.15.0'
import boto3
import sagemaker
but I get error as:
An error was encountered:
No module named 'sagemaker'
Traceback (most recent call last):
ModuleNotFoundError: No module named 'sagemaker'
Any pointers will be helpful.
This error message means that, despite your first line of code, the sagemaker module was not installed on your system. Remove the -q
(quiet) option to see the error message and why the module wasn't installed. My guess is that you need to use double quotes instead of single quotes when specifying a specific version number (eg pip install "sagemaker>=2.15.0"
).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.