(Writing on my phone, so I can't format everything properly. Sorry for that.)

I followed the steps over here to change my locale: https://superuser.com/questions/149475/start-the-week-on-monday-in-the-clock-applet-in-ubuntu/149484#149484

Except there was no en_US.utf8 directory in /usr/lib/locale.

After doing so, I restarted Ubuntu only to realize that the boot process wouldn't finish anymore. The boot screen just keeps on loading but nothing happens. During this, opening tty didn't allow me to log in since the prompt never appeared.

Eventually I booted into recover mode, dropped into root shell and modified /etc/default/grub to use nomodeset for that one parameter. I ran update-grub after that.

This resulted in me being able to reach the login screen again. Where I'm now stuck in a login loop. Opening tty works now, so I logged in. There I'm presented with an error:

Could not find platform independent libraries Could not find platform dependent libraries Consider setting $PYTHONHOME to [:] Fatal Python error: Py_Initialize: Unable to get the locale encoding ImportError: No module named 'encodings'

So. I tried the steps suggested here https://askubuntu.com/a/223634/337853 to resolve the login loop, but they didn't work.

What can I try now?


  • Removing nomodeset from the grub configuration throws me into unbootable state again. No tty login prompt there.
  • I can't seem to connect to the Internet or network (cable is plugged in) in order to reinstall things.

Open a console window with Ctrl+Alt+F1, log in there, and run the command sudo locale-gen to regenerate your locales based on the original locale definitions.

  • I forgot that I did that already because I need to gather all steps from my head. I tried it again with no success. The error in tty persists. – kleinfreund Apr 7 '17 at 10:04

Seems like your python installation is broken or incomplete. If your python installation is not in a standard location, you need the PYTHONHOME variable. You have to export that variable. Many parts of ubuntu require the standard version of python. Check you current python installation path and accordingly set the variable. If that doesn't work, I would suggest a reinstall of python

sudo apt-get install --reinstall python3

  • My PYTHONPATH variable is empty plus no python directory is located in /usr/lib. The problem now is that I get not Internet connection. – kleinfreund Apr 7 '17 at 10:14
  • Trying to reinstall python led to a world of pain. I have dpkg configuration issues which I can't resolve. My system is now dead. :( – kleinfreund Apr 7 '17 at 11:09

I don't know how it happened, but somehow my Python installation broke. Neither could I reinstall python nor build it from scratch. In the end I were only left with the option to completely reinstall my system.

I want to take this moment to thank my past self for backing up several configuration files in a git repository.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.