如何修复'ImportError:无法导入名称bin_user'

时间:2018-01-08 14:46:41

标签: python pip

File "/home/shuo/.local/bin/pip", line 7, in <module>
    from pip import main
File "/home/shuo/.opt/platform_venv/lib/python2.7/site-packages/pip/__init__.py", line 13, in <module>
    from pip.commands import commands, get_similar_commands, get_summaries
File "/home/shuo/.opt/platform_venv/lib/python2.7/site-packages/pip/commands/__init__.py", line 6, in <module>
    from pip.commands.bundle import BundleCommand
File "/home/shuo/.opt/platform_venv/lib/python2.7/site-packages/pip/commands/bundle.py", line 6, in <module>
    from pip.commands.install import InstallCommand
File "/home/shuo/.opt/platform_venv/lib/python2.7/site-packages/pip/commands/install.py", line 5, in <module>
    from pip.req import InstallRequirement, RequirementSet, parse_requirements
File "/home/shuo/.opt/platform_venv/lib/python2.7/site-packages/pip/req/__init__.py", line 3, in <module>
    from .req_install import InstallRequirement
File "/home/shuo/.opt/platform_venv/lib/python2.7/site-packages/pip/req/req_install.py", line 32, in <module>
    from pip.locations import (
ImportError: cannot import name bin_user

我正在使用Ubuntu 16.04系统。 请帮我解决这个问题。

1 个答案:

答案 0 :(得分:0)

对我有用的解决方案: 卸载python-pip rpm软件包。然后完全删除目录/usr/lib/python2.7/site-packages/pip 然后重新安装rpm软件包python-pip。