Ubuntu 18.04.5 LTS:无法安装 Python 3

时间:2021-03-18 09:20:48

标签: python-3.6 ubuntu-18.04

我想通过

安装python3(在几天前我从一位不在我们公司的员工那里得到的ubuntu系统上) <块引用>

apt 安装 python 3

但它给了我一个错误:

# Empty sitecustomize.py to avoid a dangling symlink
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ModuleNotFoundError: No module named 'encodings'
Current thread 0x00007f191af0f740 (most recent call first): Aborted
dpkg: Fehler beim Bearbeiten des Paketes python3.6-minimal
(--configure):  installed python3.6-minimal package post-installation
> script subprocess returned error exit status 134 Fehler traten auf
> beim Bearbeiten von:  python3.6-minimal

我以不同的组合尝试了所有这些命令,但没有成功:

  • apt autoremove python3.6-minimal
  • sudo apt-get update && sudo apt-get upgrade && sudo apt-get autoremove
  • dpkg --configure -a
  • locale-gen de_DE.utf8
  • 导出 PYTHONHOME

可以安装每个“其他”软件包并且 apt 正常工作。我能做什么?

0 个答案:

没有答案