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 55 views

5 answers to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
+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
• 66,880 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
• 14,980 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,710 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 by rajesh
• 1,210 points

Related Questions In Python

0 votes
2 answers

What is the python keyword “with” used for?

Please visit this site to know abt ...READ MORE

answered Aug 31, 2018 in Python by Somesh
30 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 in Python by Rakshi
12 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 in Python by Takeshi
7 views
0 votes
1 answer

Is it possible to create an array with all values as zero in python?

You can use  np.zeros(4,3) This will create a 4 ...READ MORE

answered May 24 in Python by Anjali
14 views
0 votes
1 answer

how can i count the items in a list?

suppose you have a list a = [0,1,2,3,4,5,6,7,8,9,10] now ...READ MORE

answered May 2 in Python by Mohammad
• 1,400 points
54 views
+4 votes
6 answers
+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
• 66,880 points
2,097 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
372 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.