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
gefragt vor 4 Jahren2201 Aufrufe
1 Antwort

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen