can we install python in sagemaker instance using subprocess.run?

0

can we install python in sagemaker instance using subprocess.run? If yes how to write the command ?

cmd = 'sudo yum -y install python37' subprocess.run(cmd.split(" "), check=True, shell=True) I'm getting exception "returned non-zero exit status 1"

sashi
asked 7 months ago182 views
1 Answer
0

Subprocess is part of the Python standard library. This means to use it, you will need Python installed already.

Python is installed on Sagemaker notebook instances, except for the kernels (Spark, SparkR, R). So, if you chose a kernel with python installed already, you don't have to worry about installing it.

Available kernels: https://docs.aws.amazon.com/sagemaker/latest/dg/nbi-al2.html#nbi-al2-kernel

answered 7 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions