简体   繁体   English

使所有用户都可以访问的程序 (aws cli),由 pip 安装

[英]Make a program (aws cli) accessible for all users, installed by pip

i installed aws-cli using sudo pip install awscli when i run awscli as current user it works but when i run try to run awscli as other user i get当我以当前用户身份运行 awscli 时,我使用sudo pip install awscli安装了 aws-cli,但当我运行尝试以其他用户身份运行 awscli 时,我得到

sudo -u jenkins aws
Traceback (most recent call last):
  File "/usr/local/bin/aws", line 19, in <module>
    import awscli.clidriver
  File "/usr/local/lib/python2.7/dist-packages/awscli/clidriver.py", line 17, in <module>
    import botocore.session
  File "/usr/local/lib/python2.7/dist-packages/botocore/session.py", line 28, in <module>
    import botocore.client
  File "/usr/local/lib/python2.7/dist-packages/botocore/client.py", line 16, in <module>
    from botocore import waiter, xform_name
  File "/usr/local/lib/python2.7/dist-packages/botocore/waiter.py", line 13, in <module>
    import jmespath
ImportError: No module named jmespath

Same issue occured while I was using normal user.我使用普通用户时发生了同样的问题。

# sudo -i    # switch to root
# aws configure          # give credencials

Then switch back to normal user.然后切换回普通用户。 aws configure would be working for normal user and root user. aws configure适用于普通用户和根用户。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为所有本地用户设置 AWS Powershell 的默认初始化 - Setup a default initialization of AWS Powershell for all local users AWS ELB - 目标群体健康但不可访问 - AWS ELB - Target group Healthy but not accessible 错误:pip 的依赖解析器当前不考虑所有已安装的包。 数据流 python 自定义模板 - ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. Dataflow python custom template 限制所有用户在 GCP/AWS/Azure 中将公共 IP 附加到 EC2/VM 的权限 - Restricting the permissions for all users of attaching a public IP to EC2/VM in GCP/AWS/Azure FCM,如何让组中的所有用户订阅主题 - FCM, How to make all users in group to subscribe to topic 使 gcs 对象 URL 对组织内的所有用户公开 - make gcs object URL public to all users within an organization AWS:授权用户访问特定客户端 - AWS: Authorize users to specific clients AWS Lightsail Wordpress 多站点 - 弹性 IP 不可访问 - AWS Lightsail Wordpress Multisite - Elastic IP not accessible 在 cloud9 上安装 aws cli - install aws cli on cloud9 aws cli:如何找到 kms 密钥 ID? - aws cli: how to find kms key id?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM