python pip安装组件出现 ModuleNotFoundError–No module named ‘pip._internal’解决办法

pip安装组件出现错误提示:
root@ubuntu:/usr/attack-graphs-master# pip
Traceback (most recent call last): File “/usr/local/bin/pip”, line 7, in <module>
from pip._internal import main
ModuleNotFoundError: No module named ‘pip._internal’

解决办法:重新安装pip,终端执行以下命令
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py –force-reinstall

发表评论