3

使用. flake8_ pip install flake8重新安装pep8没有帮助。我在 Mac OS X 10.9.2 上运行默认的 python。我的pep8版本是1.5.6.

 File "/usr/local/bin/flake8", 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: pep8>=1.4.6
4

1 回答 1

13

我今天在 Linux 上遇到了同样的问题。解决了这个运行:

pip install --upgrade setuptools

也希望对你有所帮助。

于 2014-05-21T15:54:09.613 回答