当我跑步时
#pip3
命令我收到以下错误。
Traceback (most recent call last):
File "/usr/bin/pip3", line 9, in <module>
from pip import main
File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 16, in <module>
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File "/usr/lib/python2.7/dist-packages/pip/vcs/subversion.py", line 9, in <module>
from pip.index import Link
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 30, in <module>
from pip.wheel import Wheel, wheel_ext
File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 6, in <module>
import compileall
File "/usr/lib/python3.5/compileall.py", line 20, in <module>
from concurrent.futures import ProcessPoolExecutor
File "/usr/lib/python2.7/dist-packages/concurrent/futures/__init__.py", line 8, in <module>
from concurrent.futures._base import (FIRST_COMPLETED,
File "/usr/lib/python2.7/dist-packages/concurrent/futures/_base.py", line 357
raise type(self._exception), self._exception, self._traceback
^
SyntaxError: invalid syntax
我试图解决什么?
步骤 1 - 卸载
sudo apt-get remove python3-pip
第 2 步 - 删除目录
/usr/local/lib/python3.5/dist-packages
第 3 步 - 重新安装 pip3
sudo apt-get install python3-pip
当我运行 pip3 命令时,仍然出现上述相同的错误。
非常感谢您的帮助?
注意 Ubuntu 版本:
DISTRIB_ID=Ubuntu
分发版本=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.5 LTS"