0

Multiple and broken python installations broke my Ubuntu 17.04. Utilities like command-not-found, synaptic package manager, update manager etc are not working. I know that it is due to python, but I can't figure out the default PYTHONHOME and PYTHONPATH.

Whenever I type an unknown command I get this error

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 0x00007f21fda8c700 (most recent call first): 
Aborted (core dumped)

It all happened because of a broken package.

Help would be really appreciated.

  • What did you do? What did you install? What command gave you the error you show? Please edit your question and clarify. – terdon Dec 6 '17 at 13:48
  • Everything was working fine but recently I tried to install a package which had some python dependency the installation failed and since then I am facing problem – Shivam Singhal Dec 6 '17 at 13:52
  • 2
    Please edit your question and tell us what package, how you tried to install it and what happened when you tried to install it. Also tell us what command gives the error you show. Showing us an error message is pointless if you don't tell us what gives the error. – terdon Dec 6 '17 at 13:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.