尝试安装or-tools,但出现以下错误。以下是运行or-tools安装命令时的完整错误代码。
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Setting up python-colorama (0.3.2-1) ...
Traceback (most recent call last):
File "/usr/bin/pycompile", line 35, in <module>
from debpython.version import SUPPORTED, debsorted, vrepr, \
File "/usr/share/python/debpython/version.py", line 24, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-colorama (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up python-distlib (0.1.9-1) ...
Traceback (most recent call last):
File "/usr/bin/pycompile", line 35, in <module>
from debpython.version import SUPPORTED, debsorted, vrepr, \
File "/usr/share/python/debpython/version.py", line 24, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-distlib (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up python-html5lib (0.999-3) ...
Traceback (most recent call last):
File "/usr/bin/pycompile", line 35, in <module>
from debpython.version import SUPPORTED, debsorted, vrepr, \
File "/usr/share/python/debpython/version.py", line 24, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-html5lib (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up python-setuptools (5.5.1-1) ...
Traceback (most recent call last):
File "/usr/bin/pycompile", line 35, in <module>
from debpython.version import SUPPORTED, debsorted, vrepr, \
File "/usr/share/python/debpython/version.py", line 24, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-setuptools (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python-pip:
python-pip depends on python-colorama; however:
Package python-colorama is not configured yet.
python-pip depends on python-distlib; however:
Package python-distlib is not configured yet.
python-pip depends on python-html5lib; however:
Package python-html5lib is not configured yet.
python-pip depends on python-setuptools (>= 0.6c1); however:
Package python-setuptools is not configured yet.
dpkg: error processing package python-pip (--configure):
dependency problems - leaving unconfigured
Setting up python-wheel (0.24.0-1) ...
Traceback (most recent call last):
File "/usr/bin/pycompile", line 35, in <module>
from debpython.version import SUPPORTED, debsorted, vrepr, \
File "/usr/share/python/debpython/version.py", line 24, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-wheel (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
python-colorama
python-distlib
python-html5lib
python-setuptools
python-pip
python-wheel
E: Sub-process /usr/bin/dpkg returned an error code (1)
用于安装or-tools的命令。
sudo apt-get -y install python3-dev python3-wheel python3-setuptools python3-six
我需要做什么来解决此问题并安装or-tools? 我需要删除引起问题的软件包吗?已经在运行项目,并且不确定删除这些项目是否会造成影响。
答案 0 :(得分:0)
日志已经显示,
ImportError:没有名为“ ConfigParser”的模块
然后,您只需要安装该模块即可,也许使用pip
或easy_install
。
$ pip install configparser