在Ubuntu 16.04上打破了Python / PIP

时间:2018-03-19 08:29:26

标签: python python-3.x ubuntu pip

我认为我在Ubuntu 16.04机器上的Python / PIP环境已经崩溃了。我只想使用此命令使用PIP安装程序:

pip3 install --user ocrmypdf

但它不起作用。运行时

pip3 --version

我收到此错误:

Traceback (most recent call last):
File "/usr/local/bin/pip3", line 7, in <module>
from pip import main
File "/usr/lib/python3/dist-packages/pip/__init__.py", line 59, in <module>
from pip.log import logger
File "/usr/lib/python3/dist-packages/pip/log.py", line 9, in <module>
import colorama, pkg_resources
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
File "/usr/share/python-wheels/setuptools-3.3-py2.py3-none-any.whl/pkg_resources.py", line 1479, in <module>
register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)
AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'

Python本身似乎有效:

root@host /usr/lib # python -V
Python 3.6.3

0 个答案:

没有答案