当我尝试安装pip软件包时,在Kali Linux中出现错误消息

时间:2020-08-03 22:15:43

标签: python pip

每次我尝试安装pip软件包时,都会收到以下错误消息。我在Kali Linux上,并且正在使用Python 3.8。

我运行的命令是:

pip install sip

我得到的输出:

Traceback (most recent call last):
  File "/usr/local/bin/pip", line 5, in <module>
    from pip._internal.cli.main import main
  File "/usr/lib/python3/dist-packages/pip/_internal/cli/main.py", line 10, in <module>
    from pip._internal.cli.autocompletion import autocomplete
  File "/usr/lib/python3/dist-packages/pip/_internal/cli/autocompletion.py", line 9, in <module>
    from pip._internal.cli.main_parser import create_main_parser
  File "/usr/lib/python3/dist-packages/pip/_internal/cli/main_parser.py", line 7, in <module>
    from pip._internal.cli import cmdoptions
  File "/usr/lib/python3/dist-packages/pip/_internal/cli/cmdoptions.py", line 19, in <module>
    from distutils.util import strtobool
ModuleNotFoundError: No module named 'distutils.util'

如果我尝试运行类似的命令

sudo apt-get install pyQt4

我收到以下错误消息(它是从另一种语言翻译过来的。)

Reading package lists ... Done
Differences tree is dealt with.
Status information is being read .... Done
E: Package python-qt4 cannot be found.

我已经尝试修复了很长时间,不胜感激。

1 个答案:

答案 0 :(得分:0)

尝试此操作解决distutils问题:

sudo apt-get install python3-distutils-extra

对于qt4

sudo apt install python3-pyqt4