缺少Python文件[重复]

我犯了一个大错误。我在终端上发出了以下命令

sudo apt-get purge python

我没有看过删除的内容:(

I use LaTeX typesetting system and some of it's packages are not working now. I've asked my question here.

如果我丢失了python文件,是否需要重新安装完整的操作系统,否则可能会有所帮助吗?

日志-

Start-Date: 2019-08-17  13:55:17
Commandline: apt-get purge python
Requested-By: ubuntu (1000)
Purge: python-webencodings:amd64 (0.5-2), python-six:amd64 (1.11.0-2), python-matplotlib:amd64 (2.1.1-2ubuntu3), vprerex:amd64 (1:6.5.1-1), python-cycler:amd64 (0.10.0-1), feynmf:amd64 (1.08-10), fragmaster:amd64 (1.7-5), python-xdg:amd64 (0.25-4ubuntu1), python-gi:amd64 (3.26.1-2ubuntu1), latex-cjk-all:amd64 (4.8.4+git20170127-2), python-tk:amd64 (2.7.16-2~18.04.york0), python-tz:amd64 (2018.3-2), python-dbus:amd64 (1.2.6-1), python-chardet:amd64 (3.0.4-1), texlive-pictures:amd64 (2017.20180305-1), python-pyparsing:amd64 (2.2.0+dfsg1-2), python-subprocess32:amd64 (3.2.7-3), python:amd64 (2.7.16-1~18.04.york0), python-lxml:amd64 (4.2.1-1ubuntu0.1), python-enum34:amd64 (1.1.6-2), texlive-xetex:amd64 (2017.20180305-1), qbittorrent:amd64 (4.0.3-1), lyx:amd64 (2.2.4-0ubuntu0.18.04.1), texlive-latex-extra:amd64 (2017.20180305-2), python-cryptography:amd64 (2.1.4-1ubuntu1.3), python-crypto:amd64 (2.6.1-8ubuntu2), texlive-music:amd64 (2017.20180305-2), python-keyrings.alt:amd64 (3.0-1), python-cffi-backend:amd64 (1.11.5-1), python-ipaddress:amd64 (1.0.17-1), python-olefile:amd64 (0.45.1-1), prerex:amd64 (6.5.4-1), texlive-lang-other:amd64 (2017.20180305-1), texlive-full:amd64 (2017.20180305-1), python-scour:amd64 (0.36-2), python-pkg-resources:amd64 (39.0.1-2), python-html5lib:amd64 (0.999999999-1), python-all:amd64 (2.7.16-1~18.04.york0), inkscape:amd64 (0.92.3-1), python-bs4:amd64 (4.6.0-1), texlive-pstricks:amd64 (2017.20180305-2), python-secretstorage:amd64 (2.3.1-2), python-dev:amd64 (2.7.16-1~18.04.york0), python-setuptools:amd64 (39.0.1-2), python-keyring:amd64 (10.6.0-1), lyx-common:amd64 (2.2.4-0ubuntu0.18.04.1), texlive-formats-extra:amd64 (2017.20180305-2), python-idna:amd64 (2.6-1), python-wheel:amd64 (0.30.0-0.2), texlive-science:amd64 (2017.20180305-2), asymptote:amd64 (2.41-4), python-dateutil:amd64 (2.6.1-1), latex-cjk-thai:amd64 (4.8.4+git20170127-2), python-numpy:amd64 (1:1.13.3-2ubuntu1), texlive-extra-utils:amd64 (2017.20180305-2), python-pil:amd64 (5.1.0-1), python-pip:amd64 (9.0.1-2.3~ubuntu1.18.04.1), python-asn1crypto:amd64 (0.24.0-1), python-backports.functools-lru-cache:amd64 (1.4-2), python-all-dev:amd64 (2.7.16-1~18.04.york0)
End-Date: 2019-08-17  13:59:03

最佳答案

我复制了您的列表,并将其与已安装的程序进行了比较(Ubuntu 19.04)。然后,我删除了在系统上“自动”修复的每个软件包。它们也将安装在您的系统上,但也标记为“自动”。

sudo apt install asymptote feynmf fragmaster inkscape latex-cjk-all latex-cjk-thai lyx lyx-common prerex python-all python python-bs4 python-chardet python-crypto python-cycler python-dbus python-gi python-html5lib python-idna python-keyring python-lxml python-matplotlib python-pil python-pkg-resources python-pyparsing python-secretstorage python-six python-subprocess32 python-tz python-xdg qbittorrent texlive-extra-utils texlive-formats-extra texlive-full texlive-lang-other texlive-music texlive-pstricks texlive-science texlive-xetex vprerex

那就是您必须安装的所有程序。随后将出现“自动”标记的程序。如果要验证是否已安装其余版本,则可以运行

apt list python-all-dev python-asn1crypto python-backports.functools-lru-cache python-cffi-backend python-cryptography python-dateutil python-dev python-enum34 python-ipaddress python-keyrings.alt python-numpy python-olefile python-pip python-scour python-setuptools python-tk python-webencodings python-wheel texlive-latex-extra texlive-pictures

并检查其余的是否已安装。如果不是,请按“手动”安装每个缺少的组件。