does python works on linux or ubuntu? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

does python works on linux or ubuntu?

13th Oct 2016, 9:12 AM
Rupesh Bhandari
Rupesh Bhandari - avatar
6 Answers
+ 6
Yes. Once you install the python interpreter, you can launch python programs with: python your_file.py You can also put this shebang at the top of your script: #!/usr/bin/env python It allows you to execute the script directly, without explicitely calling the interpreter: ./your_file.py If you want to execute some python code directly, you can use -c: python -c print("Hello world!") You can also use the interactive mode by just typing: python
13th Oct 2016, 12:38 PM
Zen
Zen - avatar
+ 2
python is platform independent language so it does not matter which is you use if you can install the interpreter in that OS, your program can run without any problem 😀
13th Oct 2016, 6:03 PM
Sunera
Sunera - avatar
0
Yuuup infact i think it works best on linix
13th Oct 2016, 10:36 AM
Shannon Green
Shannon Green - avatar
0
Allready Python intalled for Ubuntu. Can will you open CMD, after write "python" and entered finish :)
14th Oct 2016, 12:58 PM
Bekir ÇETİN
Bekir ÇETİN - avatar
0
Yeah. Python only requires a Python interpreter for a system to be compiled on it, which is available for Linux!
17th Oct 2016, 9:11 PM
Gamiac
0
yes
5th Nov 2016, 12:43 PM
Yvens Charlemagne
Yvens Charlemagne - avatar