在 ubuntu 19.10 上安装 htcondor 时出现 libpython3.6 问题

在 ubuntu 19.10 上安装 htcondor 时出现 libpython3.6 问题

我想就以下问题寻求帮助。我正在尝试在装有 ubuntu 19.10 的笔记本电脑上安装 htcondor。由于以下依赖关系问题,安装无法启动:

krzysiek@krzysiek-Lenovo-V330-15IKB:~/Downloads$sudo apt-get install htcondor
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 htcondor : Depends: libpython3.6 (>= 3.6.5) but it is not installable
E: Unable to correct problems, you have held broken packages.

我认为我在我的计算机上安装了这个包:

krzysiek@krzysiek-Lenovo-V330-15IKB:~/Downloads/Python-3.6.9$ dpkg -l | grep libpython
ii  libpython-dev:amd64                           2.7.17-1                               amd64        header files and a static library for Python2
ii  libpython-stdlib:amd64                        2.7.17-1                               amd64        interactive high-level object-oriented language (Python2)
ii  libpython2-dev:amd64                          2.7.17-1                               amd64        header files and a static library for Python2
ii  libpython2-stdlib:amd64                       2.7.17-1                               amd64        interactive high-level object-oriented language (Python2)
ii  libpython2.7:amd64                            2.7.17~rc1-1                           amd64        Shared Python runtime library (version 2.7)
ii  libpython2.7-dev:amd64                        2.7.17~rc1-1                           amd64        Header files and a static library for Python (v2.7)
ii  libpython2.7-minimal:amd64                    2.7.17~rc1-1                           amd64        Minimal subset of the Python language (version 2.7)
ii  libpython2.7-stdlib:amd64                     2.7.17~rc1-1                           amd64        Interactive high-level object-oriented language (standard library, version 2.7)
ii  libpython3-dev:amd64                          3.7.5-1                                amd64        header files and a static library for Python (default)
ii  libpython3-stdlib:amd64                       3.7.5-1                                amd64        interactive high-level object-oriented language (default python3 version)
ii  libpython3.6-minimal:amd64                    3.6.9-1~18.04                          amd64        Minimal subset of the Python language (version 3.6)
ii  libpython3.7:amd64                            3.7.5-2~19.10                          amd64        Shared Python runtime library (version 3.7)
ii  libpython3.7-dev:amd64                        3.7.5-2~19.10                          amd64        Header files and a static library for Python (v3.7)
ii  libpython3.7-minimal:amd64                    3.7.5-2~19.10                          amd64        Minimal subset of the Python language (version 3.7)
ii  libpython3.7-stdlib:amd64                     3.7.5-2~19.10                          amd64        Interactive high-level object-oriented language (standard library, version 3.7)
ii  libpython3.8:amd64                            3.8.0-3~19.10                          amd64        Shared Python runtime library (version 3.8)
ii  libpython3.8-minimal:amd64                    3.8.0-3~19.10                          amd64        Minimal subset of the Python language (version 3.8)
ii  libpython3.8-stdlib:amd64                     3.8.0-3~19.10                          amd64        Interactive high-level object-oriented language (standard library, version 3.8)

krzysiek@krzysiek-Lenovo-V330-15IKB:~/Downloads$ python3.6 --version
Python 3.6.9
krzysiek@krzysiek-Lenovo-V330-15IKB:~/Downloads$ python3.7 --version
Python 3.7.5
krzysiek@krzysiek-Lenovo-V330-15IKB:~/Downloads$ python3.8 --version
Python 3.8.0

我不明白我做错了什么。如能得到任何帮助,我将不胜感激。

尝试导入 sysconfig、导入 pprint 和 pprint.pprint(sysconfig.get_config_vars()) 我获得:

krzysiek@krzysiek-Lenovo-V330-15IKB:~$ import sysconfig;
import-im6.q16: attempt to perform an operation not allowed by the security policy `PS' @ error/constitute.c/IsCoderAuthorized/408.
krzysiek@krzysiek-Lenovo-V330-15IKB:~$ import pprint;
import-im6.q16: attempt to perform an operation not allowed by the security policy `PS' @ error/constitute.c/IsCoderAuthorized/408.
krzysiek@krzysiek-Lenovo-V330-15IKB:~$ pprint.pprint(sysconfig.get_config_vars())
bash: syntax error near unexpected token `sysconfig.get_config_vars'

我从 Synaptic Package Manager 获得了以下信息: 突触

而从终端我仍然得到我在问题开始时发布的相同错误。

答案1

我不确定 ubuntu 19.10 是否有 python 3.6,因为我的全新安装没有显示它。看来您是从第三方 PPA 安装的。无论如何,我建议您使用 pip 安装它。如果您需要htcondor为 python 3.6 安装,请使用python3.6 -m pip install htcondor。更改python3.6python3.7python3.8为这些版本的 python 安装 htcondor。

相关内容