OS X pip3被brew install python3.6.5_1破坏

时间:2018-06-20 16:34:09

标签: macos pip homebrew python-3.6

我刚刚在Mac OS(High Sierra)上重新安装了python3(3.6.5_1),pip3无法正常工作。 pip3出现以下错误:

Traceback (most recent call last):
  File "/usr/local/bin/pip3", line 11, in <module>
    load_entry_point('pip==10.0.1', 'console_scripts', 'pip3')()
  File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 476, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2700, in load_entry_point
    return ep.load()
  File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2318, in load
    return self.resolve()
  File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2324, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/local/lib/python3.6/site-packages/pip/_internal/__init__.py", line 42, in <module>
    from pip._internal import cmdoptions
  File "/usr/local/lib/python3.6/site-packages/pip/_internal/cmdoptions.py", line 16, in <module>
    from pip._internal.index import (
  File "/usr/local/lib/python3.6/site-packages/pip/_internal/index.py", line 39, in <module>
    from pip._internal.wheel import Wheel, wheel_ext
  File "/usr/local/lib/python3.6/site-packages/pip/_internal/wheel.py", line 7, in <module>
    import compileall
  File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/compileall.py", line 20, in <module>
    from concurrent.futures import ProcessPoolExecutor
  File "/Library/Python/2.7/site-packages/concurrent/futures/__init__.py", line 8, in <module>
    from concurrent.futures._base import (FIRST_COMPLETED,
  File "/Library/Python/2.7/site-packages/concurrent/futures/_base.py", line 357
    raise type(self._exception), self._exception, self._traceback
                               ^
SyntaxError: invalid syntax

which pip3返回/usr/local/bin/pip3

我已经搜索,找不到解决方案。

0 个答案:

没有答案