Score:0

Deleted python and now can not login into interface

fm flag

I started learning some python. I already had python2 and python3.8 installed as defaults. But recently installed additional version python3.11. It was not working as expected so i decided to get rid of it. But accidentally removed ALL python versions and after a reboot I am now stuck at a terminal screen with a login option.

BUT i am also stuck with Cyrillic keyboard and have no idea how to switch it to English (or rather Polish, because I removed default English option and setted up Polish instead). Login and password are in eng.

enter image description here

I can get a Ubuntu bootable USB from a friend.

I am a novice in Ubuntu and really need your help and would appreciate the most instructive list of steps to fix this. Thank you all in advance.

Apologies if this is a duplicate - I could not find a complete answer to my exact problem.

Writing this from mobile, so please don't judge

user535733 avatar
cn flag
I think you have learned a valuable lesson about 1) Carefully reading the apt output before agreeing to removals, and 2) Never alter the system-provided version of Python. Use different versions of Python in a virtual environment. Apt depends upon the proper version of Python3. Were you able to use your keyboard, it would be possible to tediously download and install each Python3 package. It may be faster and simpler to borrow your friend's USB and reinstall.
Sharpey avatar
fm flag
@karel unfortunately not, as I can not login to tty1 due to my issue with keyboard language being cyrylic instead of English and I have no way to change it
Score:0
cn flag

I am a novice in Ubuntu and really need your help and would appreciate the most instructive list of steps to fix this. Thank you all in advance.

You can make a backup from the live session if needed.

Reinstall from a live session and mount the partitions without formatting. It will leave all personal settings as is.

Works best if you are using a 2 disk (ssd/hdd for instance) or a 2 partition setup: 1 for the system and 1 for your personal files. In that case you can also format / and mount your personal partition.

Score:0
fm flag

I managed to resolve both issues. Here are the steps:

  1. Acquire bootable USB with Ubuntu.
  2. Boot into the system with "Try Ubuntu" option.
  3. Find and edit the "keyboard" file with is located under {path_to_storage}/etc/default/keyboard. (Yes, file has no extension). My disc was located in /media/ubuntu/ directory. I was also able to see it in the menu on the left. I had Cyrillic language set first, and Latin lang last. My guess was that Ubuntu just took the first option when asked for login into tty1 (see screenshot in the question). So I switched them around so that Latin was first. Saved the file and restarted my computer tried to login into tty1.
  4. Trick from step 3 worked and I was able to type in English and entered login and password.
  5. Now in the console I was able to install python with these commands:
sudo apt update
sudo apt download python3 python3-all
sudo apt install ./python*

After successful installation I also installed ubuntu-desktop and snap-store:

sudo apt-get install ubuntu-desktop
sudo snap install snap-store
  1. Everything installed successfully and I restarted my laptop with reboot command. On new load I was able to see my usual GUI, was able to login and most of applications where there.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.