How to install Phyton package in Jupyter Notebook instance in SageMaker?

0

Hi,

I want to use awswrangler package in my Jupyter Notebook instance of SageMaker.

I understand that we have to use Lifecycle configuration. I tried to do it using the following script:

#!/bin/bash

pip install awswrangler==0.2.2

But when I import that package into my Notebook:

import boto3                                      # For executing native S3 APIs
import pandas as pd                               # For munging tabulara data
import numpy as np                                # For doing some calculation
import awswrangler as wr
import io
from io import StringIO

I still get the following error:

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-f3d85c7dd0f6> in <module>()
      2 import pandas as pd                               # For munging tabulara data
      3 import numpy as np                                # For doing some calculation
----> 4 import awswrangler as wr
      5 import io
      6 from io import StringIO

ModuleNotFoundError: No module named 'awswrangler'

Any documentation or reference on how to install certain package for Jupyter Notebook in SageMaker?

AWS
Andre_J
已提問 4 年前檢視次數 2201 次
1 個回答

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南