Score:0

Ubuntu 22.04 login loop after installing Python3.10

ws flag

Yesterday I have installed Python 3.10 and today I’ve tried to login and I have stuck in the login loop. I’ve tried every suggestion on Reddit and ask ubuntu, but nothing seems to work. I’m so demoralized.

Edit:

Also when i enter terminal I always need to provide PATH to basic commands like (ls, sudo, etc.) after rebooting.

I’ve tried to reinstall python i’ve tried to install software-center, i got this issue Error: Package software center has no installation candidate after upgrade to 22.04 After this, when i’ve rebooted and tried to login i got this:

[8.890130] ACPI BIOS Error (bug): Could 
not resolue synbol (_IZ.EIDI, 
AE_NOT_FOUND (20220331/psargs-330)

[8.890265] ACPI Error: Aborting nethod '
SB. IEM. _OSC due to previous error 
(AF_NOT _FOUND) (20220331/psparse 529)

login error

Artur Meinild avatar
vn flag
Ubuntu 22.04 comes with Python 3.10 as default. Please tell us the exact steps you did to install another version (in your question). Note: Messing with the default Python version on Ubuntu is an experiment that usually don't ends well.
Iggy Kuperson avatar
ws flag
@ArturMeinild i think i’ve done something like $ echo export PATH="<PATH_TO_PYTHON>:$PATH" >> ~/.profile. From here https://realpython.com/add-python-to-path/. And sudo make altinstall After i’ve followed https://youtu.be/7H-DcdSmV0U.
karel avatar
sa flag
Does this answer your question? [Removed Python 3 and now Ubuntu Software Center, terminal and other applications don't work](https://askubuntu.com/questions/384033/removed-python-3-and-now-ubuntu-software-center-terminal-and-other-applications)
Score:1
bo flag

Since Python3.10 is available for Ubuntu 22.04 from the default repositories, you do not need to download it.

Furthermore, the system default Python version is Python3.10 and using a downloaded version to replace the default will break the system because much of the system depends on the particular default version.

Therefore, you should:

  • Boot into recovery mode from your Grub menu
  • select the option to drop to a root shell
  • run the following command:
mount -o remount,rw /
  • navigate to your user's home directory:
cd /home/PurpleAnteater

where PurpleAnteater is the actual username of your Ubuntu user (replace this with the actual username).

  • Finally, edit your .profile file:
nano .profile

and delete the path to python from the export PATH= line OR it would probably be better just to delete this line altogether. This is most likely the last line of the file.

After the line is deleted, press CTRL+o to save the file and CTRL+x to exit nano.

Use the command:

reboot

to reboot and then you should be able to log in successfully.

mchid avatar
bo flag
If you want to install an alternative version of Python or Python3.10, you should not have the manually installed version in your PATH if the manually installed version is called by the same name, e.g., `python3.10` If you need to call the manually installed version, either create an alias for it or call it using the full path to the alternative `python3.10` command. This way, the system will still use the default version where needed but you can use your alternate version for personal use.
mchid avatar
bo flag
Also, it should be noted that we almost never need to download software for Ubuntu because almost everything is available through the default repositories using `apt`. If you want to search for available software packages, run the command `apt-cache search` followed by the package name. Example: `apt-cache search python3.10` This will list all available and related packages. To install a package for example, just run something like `sudo apt update` and then `sudo apt install python3.10`.
mchid avatar
bo flag
To find out more information about a package like the version number, you can run this for example: `apt-cache show python3.10` . Finally, to filter your results, you can pipe the results to `grep` like in this command to only display results that contain the word "python": `apt-cache search python3.10 | grep -i python` And the `-i` option here disables case sensitivity for your matches.
Iggy Kuperson avatar
ws flag
THANK YOU SO MUCH!! Just followed your steps and it worked (deleted entire row in .profile)
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.