Python 如何检查distutils是否正确安装和使用?

Python 如何检查distutils是否正确安装和使用?,python,Python,我正在使用 不幸的是,我跑步有问题 python main.py NeuroNER版本:1.0-dev TensorFlow version: 1.10.0 Traceback (most recent call last): File "main.py", line 250, in <module> main() File "main.py", line 245, in main nn = NeuroNER(**arguments) File "/hom

我正在使用

不幸的是,我跑步有问题 python main.py NeuroNER版本:1.0-dev

TensorFlow version: 1.10.0
Traceback (most recent call last):
  File "main.py", line 250, in <module>
    main()
  File "main.py", line 245, in main
    nn = NeuroNER(**arguments)
  File "/home/milenko/NeuroNER-master/src/neuroner.py", line 256, in __init__
    parameters, conf_parameters = self._load_parameters(arguments['parameters_filepath'], arguments=arguments)
  File "/home/milenko/NeuroNER-master/src/neuroner.py", line 95, in _load_parameters
    nested_parameters = utils.convert_configparser_to_dictionary(conf_parameters)
NameError: name 'utils' is not defined
但这没有帮助。 如果我去

sudo apt-get install python3-distutils
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python3-distutils is already the newest version (3.6.5-3).
如何检查distutils包

If I go for
apt-cache show distutils
N: Unable to locate package distutils
E: No packages found
但是

无论如何,导入distutils不起作用


是否有类似于pip show的命令?

您对
distutils
没有问题。要定义的名称是
utils
。因此,执行import distutils.util将永远无法解决该问题

如果您查看源代码,就会发现有一个
utils.py
模块,其中定义了
convert\u configparser\u to\u dictionary
函数。你可以看到

请尝试导入utils。这将定义名称
utils
,并应按预期工作。注意:我不能测试这个

If I go for
apt-cache show distutils
N: Unable to locate package distutils
E: No packages found
apt-cache show python3-distutils
Package: python3-distutils
Architecture: all
Version: 3.6.5-3
Multi-Arch: foreign
Priority: optional
Section: python
Source: python3-stdlib-extensions
Origin: Ubuntu