Can't run python3. I get the following message:

bash: /usr/bin/python3.4: There is no such file or directory

I tried to reinstall through:

$ sudo apt-get install python3 

but the terminal says the latest version is installed.

in the / usr / bin folder, the python34 and python3.4 files are highlighted in red.

How do I get the 3rd python back?

UPDATE. After attempting to reinstall via sudo apt-get install --reinstall python3 , the following error appears: enter image description here

UPDATE2 . Попытка sudo apt-get install --reinstall python3-minimal resulted in the following:

 E: Internal Error, No file name for python3-minimal:amd64 

Attempting debsums -s also led to failure:

 bash: /usr/lib/command-not-found: /usr/bin/python3: плохой интерпретатор: Слишком много уровней символьных ссылок 
  • You can edit the question text by clicking edit below the question text. - aleksandr barakin
  • 2
    I added the answer. ps it’s still better to lay out the text as text and not as a picture: firstly, it is much easier to read, and secondly, the text is indexed by both search engines and “local” search. - aleksandr barakin pm

1 answer 1

Tried to reinstall via: sudo apt-get install python3 but the terminal says that the latest version is installed

To reinstall an already installed package (s), add the option --reinstall :

 $ sudo apt-get install --reinstall название(я)-пакета(ов) 

addition . judging by the attached picture, if the postrm package is removed, the script cannot find the py3clean program, and when installing the postinst package, the script cannot find the py3compile program.

most likely, these are files from the python3-minimal package version 3.4.0 or higher.

i.e., you either have this package removed or these files belong to the package. try to reinstall the package ( python3-minimal ), and only after the successful completion of the procedure, try again to reinstall the python3 package.


You may not have deleted files from this package. To search for such files, I recommend installing the debsums package and running:

 $ debsums -s 

This program will check the checksums of the package files and report the changed / deleted files.

  • I tried. Received the following: dpkg: error during cleanup: subprocess set, the post-installation script returned error code 127 While processing the following packages errors occurred: /var/cache/apt/archives/python3_3.4.0-0ubuntu2_amd64.deb E: Sub-process / usr / bin / dpkg returned an error code (1) - honeyPy
  • one
    1. The output of commands is better to give in the original, and not in Russian. To do this, execute export LC_ALL=C before executing the command. 2. output of commands is better placed in the text of the question, because There is no formatting in the comments and the formatted output is simply unreadable. - aleksandr barakin 4:05 pm
  • Thank you, corrected the text of the question. - honeyPy