今天,在macOS Catalina (10.15.4)系统上执行升级pip的命令
1 |
$ pip3 install --upgrade pip |
之后,执行更新命令,报告错误。如下:
1 2 3 4 5 |
$ pip3 install --upgrade PyQt5 Traceback (most recent call last): File "/usr/local/bin/pip3", line 5, in <module> from pip._internal.cli.main import main ModuleNotFoundError: No module named 'pip._internal.cli.main' |
解决方法为重新升级安装一次 pip,如下:
1 |
$ python3 -m pip install --upgrade pip |