Mostly Python comes pre-installed on most of the Ubuntu Linux distributions, but if you have something that's the bare minimal setup, you may not have it installed and when you try to run python command it will give you errors!
# python
bash: python: command not found
# python3
bash: python3: command not found
Installing Python 2.x on Ubuntu
In order to install Python version, you can make use of the command,
# apt-get install python
# python
Python 2.7.18 (default, Mar 8 2021, 13:02:45)
[GCC 9.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
Installing Python 3.x on Ubuntu
In order to install Python 3 version, you can make use of the command,
# apt-get install python3
# python3
Python 3.8.10 (default, Nov 26 2021, 20:14:08)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
More Posts related to Ubuntu,
- Fix - sudo: systemctl: command not found
- How to know the version of Ubuntu
- [Fix] Ubuntu E: Unable to locate package sudo error
- How to install Apache Maven on Ubuntu
- Steps to Kill a Running Process in Ubuntu Linux
- How to know current Ubuntu Linux version via terminal command
- How to stop/start/restart apache server using command [Ubuntu]
- Fix: Ubuntu (Linux) - bash: sudo: command not found error
- Ubuntu: How to search for a package to install using apt in Terminal
- Fix: E: Command line option --installed is not understood in combination with the other options
- How to install Python on Ubuntu
- Ubuntu Linux: How to Login as root User
- Access Windows share folder in Ubuntu Device in Network
- Add a User as a Sudoer Using Ubuntu Linux Command Line Terminal
- Install Oh My Zsh on Ubuntu Docker complete steps
- Fix: Make makefile:31 Error 127 (GCC)
- [fix] openssl No such file or directory error C++
- How to install zsh shell on Ubuntu
- Install Golang (Go) on Ubuntu
- Ubuntu Linux: Unzip a zip file using Terminal
- Where are Environment Variables stored in Ubuntu
- apt-get list --installed packages in Ubuntu Linux
- Ubuntu: List all Installed Packages using apt
- Quick steps to install Nginx on Ubuntu Linux
- How to kill service running on a port on Ubuntu Linux
More Posts:
- How to Enable Cookies in Safari on Mac - MacOS
- How to Print the Name of a Variable in Python - Python
- Java 8 foreach loop code examples - Java
- Check DNS Lookup using Mac Terminal - MacOS
- How to know the current version of Java - Java
- macOS - cannot calculate MAC address: Using fd 9 hv_vm_create HV_ERROR [PHP XAMPP] - PHP
- Reduce the size of Tabs on Notepad++ - NotepadPlusPlus
- Notepad++ copy above line-example - NotepadPlusPlus