INSTALLING PYTHON ON UBUNTU

  Installing Python on Ubuntu  

Ubuntu 20.04 ships with both Python 3 and Python 2 pre-installed. To make sure that our versions are up-to-date, let's update and upgrade the system with the apt command to work with Ubuntu's Advanced Packaging Tool: sudo apt update.


STEP 1:    Open Ubuntu.


STEP 2:   Press the Windows button on the keyboard and type ' terminal' or press the shortcut Ctrl+Alt+T to open the terminal. 




And then Write the following command for install python.

sudo apt-get install python3



STEP 3:   Once the terminal is open, type Python3 --version to check if it is installed.



STEP 4:   To launch the command line mode or interactive mode of Python 3.X version in Ubuntu, type Python3 on the terminal.



From Figure we can see the command line mode of Ubuntu has been started and programmer is ready to give instructions to Python. The following figure illustrates an example of printing 'hello' in the command line mode of Ubuntu.



STEP 5:   A programmer can launch Python IDE mode in Ubuntu in the same manner. To launch the IDLE mode of Python, type the command given below on the terminal.

Python -m idlelib


Note:  If IDLE is not installed then the programmer can install it by typing             the command given below on the terminal.

sudo apt-get install idle3


Telegram link:  Click here


Comments

Popular posts from this blog

Python Implementations