LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-18-2018, 04:50 PM   #1
vysero
Member
 
Registered: May 2018
Posts: 137

Rep: Reputation: Disabled
Updating Python version


Currently, I have two versions of Python on my computer. Python 2.x which came with my installation of Ubuntu 16.04 and python 3.5.2 which I downloaded via a: sudo apt-get. Now, I want to upgrade my 3.5.2 too 3.7. I was wondering what is the most efficient way of doing this and can it be done without loosing all the modules I have downloaded for 3.5.2? I already have the tar ball I just am worried about installing everything. I dont want to loose all my modules.
 
Old 07-18-2018, 07:23 PM   #2
wagscat123
Member
 
Registered: Jan 2009
Location: Maryland-Pennsylvania border, USA
Distribution: openSUSE 15.2/15.3, Tumbleweed, Kubuntu 18.04/21.04, macOS 10.15, antiX 19, and Linux Mint 19.3
Posts: 860
Blog Entries: 45

Rep: Reputation: 120Reputation: 120
See 2. or (more easily) 3. and substitute 3.6 with 3.7

http://www.python36.com/install-python36-on-ubuntu/
 
Old 07-19-2018, 10:36 AM   #3
vysero
Member
 
Registered: May 2018
Posts: 137

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by wagscat123 View Post
See 2. or (more easily) 3. and substitute 3.6 with 3.7

http://www.python36.com/install-python36-on-ubuntu/
Odd, I was able to run:

sudo add-apt-repository ppa:jonathonf/python-3.7

but when I ran:

sudo apt install python3.7

I got an error:

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python3.7
E: Couldn't find any package by glob 'python3.7'
E: Couldn't find any package by regex 'python3.7'

Last edited by vysero; 07-19-2018 at 10:38 AM.
 
Old 07-19-2018, 10:51 AM   #4
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Quote:
Originally Posted by vysero View Post
Odd, I was able to run:

sudo add-apt-repository ppa:jonathonf/python-3.7

but when I ran:

sudo apt install python3.7

I got an error:

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python3.7
E: Couldn't find any package by glob 'python3.7'
E: Couldn't find any package by regex 'python3.7'
Did you run sudo apt update to refresh the package indices after adding the repository?
 
Old 07-19-2018, 11:14 AM   #5
vysero
Member
 
Registered: May 2018
Posts: 137

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by hydrurga View Post
Did you run sudo apt update to refresh the package indices after adding the repository?
Yes Sr I did do that.
 
Old 07-19-2018, 11:19 AM   #6
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Ok. Let's have a look at your software sources to see if the repository was correctly added.

Please paste the output from:

Code:
inxi -r
If inxi isn't installed on your system, install it with sudo apt install inxi.
 
Old 07-19-2018, 11:23 AM   #7
vysero
Member
 
Registered: May 2018
Posts: 137

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by hydrurga View Post
Ok. Let's have a look at your software sources to see if the repository was correctly added.

Please paste the output from:

Code:
inxi -r
If inxi isn't installed on your system, install it with sudo apt install inxi.

Repos: Active apt sources in file: /etc/apt/sources.list
deb http://us.archive.ubuntu.com/ubuntu/ xenial main restricted
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
deb http://us.archive.ubuntu.com/ubuntu/ xenial universe
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe
deb http://us.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
deb http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://security.ubuntu.com/ubuntu xenial-security universe
deb http://security.ubuntu.com/ubuntu xenial-security multiverse
Active apt sources in file: /etc/apt/sources.list.d/dominik-stadler-ubuntu-dsta-xenial-ppa-xenial.list
deb http://ppa.launchpad.net/dominik-sta...ial-ppa/ubuntu xenial main
Active apt sources in file: /etc/apt/sources.list.d/getdeb.list
deb http://archive.getdeb.net/ubuntu trusty-getdeb apps
Active apt sources in file: /etc/apt/sources.list.d/jonathonf-ubuntu-python-3_7-xenial.list
deb http://ppa.launchpad.net/jonathonf/python-3.7/ubuntu xenial main
Active apt sources in file: /etc/apt/sources.list.d/openjdk-r-ubuntu-ppa-xenial.list
deb http://ppa.launchpad.net/openjdk-r/ppa/ubuntu xenial main
Active apt sources in file: /etc/apt/sources.list.d/webupd8team-ubuntu-java-xenial.list
deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main
 
Old 07-19-2018, 11:25 AM   #8
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Thanks. Ok, it's there. Can you please paste the full output from sudo apt update.

Note that you should enclose all output here within CODE tags (see the # on LQ's advanced edit menu).
 
Old 07-19-2018, 12:02 PM   #9
vysero
Member
 
Registered: May 2018
Posts: 137

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by hydrurga View Post
Thanks. Ok, it's there. Can you please paste the full output from sudo apt update.

Note that you should enclose all output here within CODE tags (see the # on LQ's advanced edit menu).
Yep np:

Code:
rob@server038:~$ sudo apt update
Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [107 kB]
Hit:2 http://us.archive.ubuntu.com/ubuntu xenial InRelease                                                   
Get:3 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]                                  
Hit:4 http://ppa.launchpad.net/dominik-stadler/dsta-xenial-ppa/ubuntu xenial InRelease                       
Get:6 http://ppa.launchpad.net/jonathonf/python-3.7/ubuntu xenial InRelease [18.0 kB]                        
Get:7 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]                                
Get:8 http://security.ubuntu.com/ubuntu xenial-security/main amd64 DEP-11 Metadata [67.7 kB]                 
Get:9 http://security.ubuntu.com/ubuntu xenial-security/main DEP-11 64x64 Icons [68.0 kB]                    
Get:10 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [806 kB]                       
Get:11 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 DEP-11 Metadata [107 kB]             
Get:12 http://security.ubuntu.com/ubuntu xenial-security/universe DEP-11 64x64 Icons [147 kB]                
Hit:5 http://screenshots.getdeb.net trusty-getdeb InRelease                                                  
Hit:13 http://ppa.launchpad.net/openjdk-r/ppa/ubuntu xenial InRelease                                        
Get:14 http://us.archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages [736 kB]                        
Hit:15 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease                                     
Get:16 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 DEP-11 Metadata [318 kB]
Get:17 http://us.archive.ubuntu.com/ubuntu xenial-updates/main DEP-11 64x64 Icons [222 kB]
Get:18 http://us.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [641 kB]
Get:19 http://us.archive.ubuntu.com/ubuntu xenial-updates/universe i386 Packages [584 kB]
Get:20 http://us.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 DEP-11 Metadata [246 kB]
Get:21 http://us.archive.ubuntu.com/ubuntu xenial-updates/universe DEP-11 64x64 Icons [334 kB]
Get:22 http://us.archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 DEP-11 Metadata [5,964 B]
Get:23 http://us.archive.ubuntu.com/ubuntu xenial-backports/main amd64 DEP-11 Metadata [3,328 B]
Get:24 http://us.archive.ubuntu.com/ubuntu xenial-backports/universe amd64 DEP-11 Metadata [5,100 B]
Fetched 4,632 kB in 2s (2,042 kB/s)                                      
AppStream cache update completed, but some metadata was ignored due to errors.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
3 packages can be upgraded. Run 'apt list --upgradable' to see them.
 
Old 07-19-2018, 12:46 PM   #10
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Thanks. I wonder what the metadata that was ignored was?

Let's see if Python 3.7's in the cache.

Code:
sudo apt policy python3.7
 
Old 07-19-2018, 12:49 PM   #11
vysero
Member
 
Registered: May 2018
Posts: 137

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by hydrurga View Post
Thanks. I wonder what the metadata that was ignored was?

Let's see if Python 3.7's in the cache.

Code:
sudo apt policy python3.7
Code:
rob@server038:~$ sudo apt policy python3.7
[sudo] password for rob: 
N: Unable to locate package python3.7
N: Couldn't find any package by glob 'python3.7'
N: Couldn't find any package by regex 'python3.7'
Edit: I have the tarball. Can I just unpack it in usr/local/lib?

Last edited by vysero; 07-19-2018 at 01:00 PM.
 
Old 07-19-2018, 12:59 PM   #12
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
I suspect that there's a problem with the PPA. You should contact the maintainer and ask them what's up. It might just be a temporary problem.
 
Old 07-19-2018, 01:04 PM   #13
vysero
Member
 
Registered: May 2018
Posts: 137

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by hydrurga View Post
I suspect that there's a problem with the PPA. You should contact the maintainer and ask them what's up. It might just be a temporary problem.
Sorry, PPA? Is that the repository hosted by this jonathonf fellow?
 
Old 07-19-2018, 01:07 PM   #14
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Quote:
Originally Posted by vysero View Post
Sorry, PPA? Is that the repository hosted by this jonathonf fellow?
Yes. A PPA is a Personal Package Archive. That's what you added to your software sources.
 
Old 07-19-2018, 01:22 PM   #15
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Just a thought. Disable the PPA and then run apt update again - if you don't receive the same "AppStream cache update completed, but some metadata was ignored due to errors" message then faulty metadata at that PPA is most probably to blame.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Error when loading a module with Python/updating python from command prompt vysero Linux - Newbie 0 07-19-2018 08:45 AM
[SOLVED] Updating Python Version to 3.6.4 asher@tehll Linux - Software 16 01-14-2018 01:15 PM
[SOLVED] Updating Python to a newer version - easy or too difficult? grumpyskeptic Linux - Software 7 05-01-2017 10:42 AM
Updating version for the python thangappan Linux - Newbie 4 09-08-2009 12:46 AM
python problem - compiled from source - python -V still showing old version txm123 Linux - Newbie 1 02-15-2006 11:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:08 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