I broke python: what can I do?

I have a big problem with 64 bits of Ubuntu ...

I tried to clear the python test that I did when I compiled a modified version of python. But I think I broke everything: s

now when i run cmd "python3" i have:

>python3 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 ImportError: No module named 'encodings' Aborted 

I cannot "apt-get install python3.3" and I cannot remove it ...

I tried:

 apt-get clean apt-get autoclean apt-get update apt-get upgrade 

nothing

I do not know what I can do now ...

EDIT: I think too much is broken. Fortunately, I backed up my virtual machine a week ago. Therefore, I restored it, as before.

The next time I would like to reinstall the package correctly, I will use "sudo apt-get install - reinstall python3". (Thanks)

However, I think we cannot remove python3 when it compiles at home ( https://askubuntu.com/questions/244544/how-to-install-python-3-3 ) .... "make: *** There is no rule to make the target "uninstall". :)

Thanks everyone!

+4
source share
3 answers

Reinstall python:

 sudo apt-get install --reinstall python3 
+3
source

Perhaps you could try apt-get remove python-3.3 , then apt-get clean , apt-get update , and then apt-get install python-3.3 ?

0
source

If you just need to work and not worry about the old setup, you can download python and compile it in a specific place and just run it from there. See: https://askubuntu.com/questions/244544/how-to-install-python-3-3

0
source

Source: https://habr.com/ru/post/1502466/


All Articles