I was using the elastic beanstalk cli with AWS without any difficulty a few months ago. I wanted to update my website and ran into this error:
me$ eb status Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/bin/eb", line 5, in from pkg_resources import load_entry_point File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources/init.py", line 3095, in @_call_aside File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources/init.py", line 3081, in _call_aside f(*args, **kwargs) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources/init.py", line 3108, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources/init.py", line 660, in _build_master return cls._build_from_requirements(requires) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources/init.py", line 673, in _build_from_requirements dists = ws.resolve(reqs, Environment()) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources/init.py", line 846, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'blessed==1.9.5' distribution was not found and is required by awsebcli
I haven't been able to find anything about this error, except for a question about how to deal with a similar problem on ubuntu (I'm on a Mac) that has gone unanswered for a month.
Does anyone have any ideas?
PDF. The EB CLI is a command line interface for AWS Elastic Beanstalk that provides interactive commands that simplify creating, updating and monitoring environments from a local repository. Use the EB CLI as part of your everyday development and testing cycle as an alternative to the Elastic Beanstalk console.
The easiest and recommended way to install the EB CLI is to use the EB CLI setup scripts available on GitHub. Use the scripts to install the EB CLI on Linux, macOS, or Windows. The scripts install the EB CLI and its dependencies, including Python and pip . The scripts also create a virtual environment for the EB CLI.
This is most likely caused by the fact that the eb
script is using Apple's Python interpreter instead of the one you installed yourself.
There are two workarounds:
virtualenv ~/eb_cli_env
.source ~/eb_cli_env/bin/activate
to activate the created virtual environment.pip install awsebcli
.After that, you should be able to use the eb
command just fine. You will have to run source ~/eb_cli_env/bin/activate
every time before you can use the EB CLI.
--OR--
eb
scriptvim /usr/local/bin/eb
.#!/usr/bin/python
to #!/usr/bin/env python
.This will ensure the eb
command works globally without using a virtual environment, however it is very likely that if you upgrade the awsebcli
package you will have to edit the shebang line again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With