安装EB CLI 3.0后出现Python DistributionNotFound错误
作者:互联网
尝试了很多东西,但是在多次尝试更新python,pip等之后不断出现这个错误.我在OS X上运行10.9.5.
CMD% eb
Traceback (most recent call last):
File "/usr/local/bin/eb", line 5, in <module>
from pkg_resources import load_entry_point
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in <module>
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
pkg_resources.DistributionNotFound: python-dateutil>=2.1,<3.0.0
解决方法:
我在尝试运行eb时遇到了类似的错误,但不是因为日期…
Traceback (most recent call last):
File "/usr/local/bin/eb", line 5, in <module>
from pkg_resources import load_entry_point
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in <module>
working_set.require(__requires__)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require
needed = self.resolve(parse_requirements(requirements))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: requests>=2.6.1,<2.7
对我来说,解决方案是更新setuptools:
sudo pip install --upgrade setuptools
希望能帮到别人.
标签:python,python-2-7,amazon-web-services,elastic-beanstalk,command-line-interface 来源: https://codeday.me/bug/20191007/1868535.html