0

When I run eb --version it errors out with a DistributionNotFound.

(my-venv) MBP-2:folder username$ eb --version

The traceback is:

    Traceback (most recent call last):
      File "/usr/local/bin/eb", line 5, in <module>
        from pkg_resources import load_entry_point
      File "build/bdist.macosx-10.9-intel/egg/pkg_resources.py", line 2697, in <module>
      File "build/bdist.macosx-10.9-intel/egg/pkg_resources.py", line 669, in require
      File "build/bdist.macosx-10.9-intel/egg/pkg_resources.py", line 572, in resolve
    pkg_resources.DistributionNotFound: docker-py>=1.1.0,<1.2

Looking at this question, I tried the following, to no avail:

  1. updated awsebcli: pip3 install awsebcli --upgrade
  2. updated setuptools: pip3 install setuptools --upgrade
  3. updated docker-py: pip3 install docker-py --upgrade

The problem still persists. But when I use sudo, it works correctly:

(my-venv) MBP-2:folder username$ sudo eb --version
EB CLI 3.15.2 (Python 3.6.1)

I think this was caused by a time-consuming homebrew auto-update. How do I fix this?

Edit:

These are my python versions in my virtual env.

(my-venv) MBP-2:folder username$ which python
/Users/username/my-venv/bin/python

(my-venv) MBP-2:folder username$ head -1 $(which eb)
#!/Users/username/my-venv/bin/python3

(my-venv) MBP-2:folder username$ head -1 $(which pip)
#!/Users/username/my-venv/bin/python3

(my-venv) MBP-2:folder username$ python --version
Python 3.6.1

(my-venv) MBP-2:folder username$ python3 --version
Python 3.6.1
Pranab
  • 2,207
  • 5
  • 30
  • 50

1 Answers1

2

So far as I can tell, ebcli does not have a dependency on docker-py, but rather just the docker package. So this suggests to me that there may be some wires getting crossed in which packages are being installed.

What I'd recommend trying is recreating this virtualenv and only installing ebcli without the other packages. That may sort out the errors that you're seeing.