我已经从 Jenkins 管道执行了一个 python
boto3
脚本,作业失败并出现以下错误 -
import boto3 ImportError: No module named boto3
Jenkins 在
AWS EC2
t2.xlarge
上运行,boto3
模块安装在 python2.7(默认)和 python3.5 上。
如果我使用 ec2
从 ec2-user
实例执行 python 脚本,我不会看到上述错误。
如有任何解决方案,请告诉我。
谢谢。
以 jenkins 用户身份登录并安装 boto3。以下命令供参考:
sudo su -s /bin/bash jenkins
pip install boto3 --user