ImportError: No module named 'pip._internal'

Problem Description

When upgrading pip3, the following error message was found

Traceback (most recent call last):
  File "/home/hans/.local/bin/pip3", line 7, in <module>
    from pip._internal.cli.main import main
ImportError: No module named 'pip._internal'

Insert picture description here

Solution

Force reinstallation of pip3

wget https://bootstrap.pypa.io/get-pip.py --no-check-certificate

sudo python3 get-pip.py --force-reinstall

Guess you like

Origin blog.csdn.net/yong15565566939/article/details/105597466