I'm a new user in Ubuntu, new in Linux domain. I have python3.10 as the system version. I have been trying to update to 3.12.2. I downloaded the python3.12.2 file from python.org. After that, I followed some steps which I think that entirely messed my system. I am sharing those steps if this help anybody in future can avoid.
Step 1:
tar -xf Python-3.10.2.tgz # Replace "Python-3.10.2.tgz" with the name of the downloaded filecd Python-3.10.2./configuremakesudo make install
First Error :
configure: error: in `/home/user/Downloads/Python-3.12.2':configure: error: no acceptable C compiler found in $PATHSee `config.log' for more details
Step 2:To resolve it, I did the following:
sudo apt updatesudo apt install build-essential
Step 3:
cd /path/to/Python-3.12.2 ./configuremake sudo make install
Error: After the make command, everything went to hell!
Step 4:To resolve the above issue, I tried this:
sudo apt updatesudo apt install libssl-dev
Error: Nothing resolved. No luck
Step 5:Tried to update interpreter from pycharm. No luck.Meanwhile, my pip and python3 returning two separate locations!
After all these, my machine was going all different directions. Reinstalled ubuntu again and back to 3.10