本文介绍了Elastic Beanstlak CLI安装错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用sudo pip install awsebcli --upgrade --user

运行eb --version时,出现以下错误.

When running eb --version I get the following error.

Traceback (most recent call last):
  File "/home/andrew/.local/bin/eb", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/local/google-cloud-sdk/platform/google_appengine/lib/setuptools-0.6c11/pkg_resources.py", line 2603, in <module>
    working_set.require(__requires__)
  File "/usr/local/google-cloud-sdk/platform/google_appengine/lib/setuptools-0.6c11/pkg_resources.py", line 666, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/local/google-cloud-sdk/platform/google_appengine/lib/setuptools-0.6c11/pkg_resources.py", line 565, in resolve
    raise DistributionNotFound(req)  # XXX put more info here
pkg_resources.DistributionNotFound: awsebcli==3.12.4

有什么想法吗?

这是我的pip --version:

pip 9.0.3 from /usr/local/lib/python2.7/dist-packages (python 2.7)

推荐答案

问题是您以root用户身份安装了awsebcli,但以非root用户身份执行了eb --version.因此,就非root用户而言,awsebcli从未安装.

The problem is that you installed awsebcli as the root user, but performed eb --version as a non-root user. So, as far as the non-root user is concerned, awsebcli never got installed.

要以非root用户身份运行eb:

  1. pip install awsebcli(无sudo)

要验证是否有效,请在pip list

To verify this worked, find awsebcli in the output of pip list

如果1.引起问题,建议您在设置 virtualenv .基本上,virtualenv分隔了您的Python软件包,因此您不会弄乱系统版本的Python和root用户.

If 1. causes you a problem, I recommend installing the awsebcli after setting up a virtualenv. Basically, virtualenv compartmentalizes your Python packages so you do not mess with the system's version of Python and the root user.

这篇关于Elastic Beanstlak CLI安装错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-27 15:11