Elastic Beanstlak CLI Installation Error

2019-03-03 01:58发布

I downloaded the EBCLI with sudo pip install awsebcli --upgrade --user

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

Any ideas?

Edit:

Here is my pip --version:

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

1条回答
女痞
2楼-- · 2019-03-03 02:49

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.

To run eb as a non-root user:

  1. pip install awsebcli (without the sudo)

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

  3. 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.

查看更多
登录 后发表回答