is python compatible with Linux

+3 votes
I have some basic knowledge of the Python language. the Python works as the interpreter. the codes are also quite complicated. I have some question. can I use it in Linux? Can anyone help me to solve it?
Sep 8, 2018 in Python by allensmith
• 150 points

edited Sep 11, 2018 by Vardhan 2,164 views

5 answers to this question.

+2 votes

Yes, you can use python on Linux. Most of the Linux distros come with python pre-installed. To check if python is installed, open the terminal and run the following command
 

python --version


This will print the version of Python installed (if it is installed)

To install python on your Linux system, you can run the following command.

To Install python version 2:

sudo apt-get install python2.x


To install python version 3:
 

sudo apt-get install python 3.x

Where "x" is to be replaced with the version number.

answered Sep 11, 2018 by Omkar
• 69,220 points
+2 votes

If you have python already installed on your machine you can simply check the version by 

python --version

Now if you don't have python installed then

1. for ubuntu you can install it using 

sudo apt-get install python

2. for red hat you can install it using

sudo yum install python

3. for SUSE and derivatives you can install it using 

sudo zypper install python
answered Sep 11, 2018 by bug_seeker
• 15,510 points
+2 votes
Just follow these three commands and you should be good to go
sudo add-apt-repository ppa:jonathonf/python-3.6


sudo apt-get update

sudo apt-get install python3.6
answered Sep 12, 2018 by charlie_brown
• 7,720 points
0 votes
Quick Answer.

Yes.

By default most of the Linux/Unix based hosts will be having Python. If not python (refer to python2.x), it will be there python3.x.

In linux, you can type: python<tab><tab>  # type python and press <tab> key twice to see the commands installed in your computer.

also you can use "--version" argument after the python binary.

Example:

python --version
Python 2.7.15

python3 --version
Python 3.7.0
answered Nov 25, 2018 by Amit
• 180 points
Nice explanation @Amit thank you.
+1 vote
yes you can use python on linux
answered Feb 13, 2019 by rajesh
• 1,270 points

Related Questions In Python

0 votes
3 answers

What is the python keyword “with” used for?

The with statement in Python simplifies exception ...READ MORE

answered Jul 19, 2019 in Python by rahul
• 360 points
1,656 views
0 votes
1 answer

How Lambda() is used with filter() in python?

The filter() function in Python takes in ...READ MORE

answered May 20, 2019 in Python by Rakshi
1,048 views
0 votes
1 answer

How is lambda() used with map() in python?

The map() function in Python takes in ...READ MORE

answered May 20, 2019 in Python by Takeshi
827 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,442 views
0 votes
1 answer
+5 votes
6 answers

Lowercase in Python

You can simply the built-in function in ...READ MORE

answered Apr 11, 2018 in Python by hemant
• 5,790 points
4,078 views
+1 vote
2 answers

Measuring the distance between pixels on OpenCv with Python

You can try this: Mat pts1(nPts, 1, CV_8UC2), ...READ MORE

answered Aug 24, 2018 in Python by Omkar
• 69,220 points
10,555 views
+7 votes
8 answers

Difference for string comparison in Python: 'is' vs. ==

If we use "==" means both variables ...READ MORE

answered Sep 3, 2018 in Python by Parul Raheja
2,446 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP