简体   繁体   中英

AWS-RunShellScript calls python script but can't find python modules

I am attempting to run a shell script on an ec2 from the systems manager. The shell script has a call to run a python script. It works perfectly when I run it manually, but if I run it through the systems manager it says it can't find the downloaded module. The module is numpy if that changes anything. Why is doesn't this work?

Why is doesn't this work?

Probably because SSM does not execute as your normal user (ubuntu or ec2-user) in its shell. You should install numpy system wide, or change your user when your AWS-RunShellScript executes your scripts.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM