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
gefragt vor 8 Monaten194 Aufrufe
1 Antwort
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

beantwortet vor 8 Monaten

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