Installing Python on Ununtu 18.04

Asked by davidzaq1

I am taking a python class to learn programming and they have a video on intalling Python on Ubuntu.
I person has very good explanations for installing Python on Ubuntu but the problem I am having is that it is a .tar.gz file.
I thought we were not supposed to install anything on Ubuntu that is not in the software center.
It installing this tar safe for the computer even though it is from Python.org?

Thank you

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Python is installed by default. What is the file you have downloaded?

Revision history for this message
Manfred Hampl (m-hampl) said :
#2

You seem to have a wrong perception of the Ubuntu package management system.

The main purposes is having an easy way for installing and uninstalling packages, making sure that all dependencies are met, and periodic checks to make sure that updated versions are installed.

Of course you are allowed to install software from other sources, but you have to be aware that you lose the benefits of Ubuntu's package management system, and you have to make sure that the external version and the Ubuntu-provided version (if any) do not conflict to each other.

In your case the first step probably has to be to answer the questions:
Is python already installed on your system? (It probably is)
Does the installed version fulfill the requirements of the course? (There are certain differences between python version 2 and version 3.)
If Ubuntu's version is sufficient, then there is no need for installing another version - unless the aim of the course includes some "how to install software on Ubuntu" topic.

Revision history for this message
davidzaq1 (david3a9x) said :
#3

How can I check to see if Python 3 is installed? I cannot find it although when the updates were installing, I did see a
Python 3 flash by so I think it is there.

Thank you

Revision history for this message
Manfred Hampl (m-hampl) said :
#4

The commands

dpkg -l | egrep ' python[0-9].[0-9]'
which python3
python3 --version

should help verifying whether you have python3 installed

Revision history for this message
davidzaq1 (david3a9x) said :
#5

Here is the outputs from above.

dpkg -l | egrep ' python[0-9].[0-9]'
ii python2.7 2.7.15-4ubuntu4~18.04 amd64 Interactive high-level object-oriented language (version 2.7)
ii python2.7-minimal 2.7.15-4ubuntu4~18.04 amd64 Minimal subset of the Python language (version 2.7)
ii python3.6 3.6.8-1~18.04.1 amd64 Interactive high-level object-oriented language (version 3.6)
ii python3.6-minimal 3.6.8-1~18.04.1 amd64 Minimal subset of the Python language (version 3.6)

$ which python3
/usr/bin/python3
stan@roo:~$ python3 --version
Python 3.6.8

Revision history for this message
Manfred Hampl (m-hampl) said :
#6

You definitely have python 3 already installed. I do not see any need for trying to install another version from a tar.gz file.

Can you help with this problem?

Provide an answer of your own, or ask davidzaq1 for more information if necessary.

To post a message you must log in.