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:
- updated awsebcli:
pip3 install awsebcli --upgrade
- updated setuptools:
pip3 install setuptools --upgrade
- 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