LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-26-2023, 05:50 AM   #1
Flexico
Member
 
Registered: Aug 2015
Distribution: Mint MATE
Posts: 153

Rep: Reputation: Disabled
Can't Revert to Repository Version of Python3


I manually installed Python version 3.12.0 (the version that installed by default is 3.10.6), but it turns out I now need to manually install/update all plugins in addition to the main Python version. Preferring to let apt do that work, I tried to downgrade Python3 back to the repository version, but it says that it's still on version 3.10.6, even though when I actually run "python3" it says "3.12.0".

Code:
flexico@flexico-laptop-5590 ~ $ sudo apt install python3=3.10.6-1~22.04
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
python3 is already the newest version (3.10.6-1~22.04).
0 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
flexico@flexico-laptop-5590 ~ $ python3
Python 3.12.0 (main, Oct 24 2023, 11:47:45) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
 
Old 10-26-2023, 06:05 AM   #2
lvm_
Member
 
Registered: Jul 2020
Posts: 984

Rep: Reputation: 348Reputation: 348Reputation: 348Reputation: 348
Apparently you installed it not as a deb package but as a bunch of files, so naturally apt which works with metadata provided by packages, not with actaual files, knows nothing about it. Try apt-get reinstall.
 
Old 10-26-2023, 06:29 AM   #3
Flexico
Member
 
Registered: Aug 2015
Distribution: Mint MATE
Posts: 153

Original Poster
Rep: Reputation: Disabled
That didn't work! I tried apt & apt-get.
Code:
flexico@flexico-laptop-5590 ~ $ sudo apt-get reinstall python3
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 11 not upgraded.
Need to get 0 B/22.8 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 764194 files and directories currently installed.)
Preparing to unpack .../python3_3.10.6-1~22.04_amd64.deb ...
running python pre-rtupdate hooks for python3.10...
Unpacking python3 (3.10.6-1~22.04) over (3.10.6-1~22.04) ...
Setting up python3 (3.10.6-1~22.04) ...
running python rtupdate hooks for python3.10...
running python post-rtupdate hooks for python3.10...
Processing triggers for man-db (2.10.2-1) ...
flexico@flexico-laptop-5590 ~ $ python3 --version
Python 3.12.0
 
Old 10-26-2023, 06:52 AM   #4
lvm_
Member
 
Registered: Jul 2020
Posts: 984

Rep: Reputation: 348Reputation: 348Reputation: 348Reputation: 348
So maybe now you have two versions installed? To see a list of files installed from a package use 'dpkg-query -L python3', but only you know where you installed the newer version, although 'which python3' will point you in the right direction.
 
Old 10-26-2023, 07:53 AM   #5
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,041

Rep: Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348
yes, I think you have two versions installed, probably you can find them as python3.10 and python3.12 (and python3 is just a link to python3.12)
 
Old 10-28-2023, 08:28 AM   #6
Flexico
Member
 
Registered: Aug 2015
Distribution: Mint MATE
Posts: 153

Original Poster
Rep: Reputation: Disabled
Aha! "python3" pointed to "/usr/local/bin/python3" which was 3.12.0; I deleted those files and it reset back to "/user/bin/python3" (3.10.12). Thanks for the help!
 
  


Reply

Tags
apt, python3



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
python3 -V returns Python 2.7.12, can't get python3 to work. gene_ Ubuntu 15 03-18-2019 10:39 AM
[SOLVED] making python3.6.4 default python3 Astral Axiom Linux - Newbie 17 04-14-2018 10:55 AM
[SOLVED] how to start python3.6 interpreter just by typing python in terminal not python3.6 bmohanraj91 Linux - Newbie 4 05-10-2017 07:51 AM
After upgrade python3.4 to python3.5.1 , not able to install packages "request" though pip3 YOGESHAS87 Linux - Software 1 08-03-2016 10:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration