In this tutorial we shall install Python IDE, PyCharm and write our first Python HelloWorld Program.

Install PyCharm – Python IDE

Download Community Edition of PyCharm from[https://www.jetbrains.com/pycharm/download/].

PyCharm Download - Python IDE Setup - Python Tutorial - www.tutorialkart.com
PyCharm Download

The size of the file would be around 200MB. Lean back and relax a bit.

Extract the package and go to bin folder, and run “./pycharm.sh” from the terminal

PyCharm Theme Selection - PyCharm IDE - Python Tutorial - www.tutorialkart.com
PyCharm Theme Selection

Dracula theme is selected, you would choose one that best fits your eyes and hit OK.

PyCharm should ask for a restart.

PyCharm Restart - PyCharm IDE - Python Tutorial - www.tutorialkart.com
PyCharm Restart

Click Yes and the PyCharm restarts.

PyCharm Restarts - PyCharm IDE - Python Tutorial - www.tutorialkart.com
PyCharm Restarts

And a prompt for creation of new project appears.

Create New Project - PyCharm IDE - Python Tutorial - www.tutorialkart.com
Create New Project

Click on “Create New Project”.

Project Name and Interpreter Selection - PyCharm IDE - Python Tutorial - www.tutorialkart.com
Project Name and Interpreter Selection

Click on the settings button next to the interpreter field and click on “Add” and browse to the location of Python 3.6.1. And click on “Create” button.

The location of Python 3.6.1 can be found using “whereis python3” command as below.

Whereis Python3 - PyCharm IDE - Python Tutorial - www.tutorialkart.com
Whereis Python3

The PyCharm IDE window is displayed with “PythonTutorial” in the “Project files section”.

Right Click on the project “PythonTutorial” -> New -> Python File

helloworld.py - PyCharm IDE - Python Tutorial - www.tutorialkart.com
helloworld.py

helloworld.py is created under the project.

Python HelloWorld Program

Enter the print statement in helloworld.py as shown below and save.

helloworld.py print statement - Python Helloworld Program - Python Tutorial - www.tutorialkart.com
helloworld.py print statement

Right click on helloworld.py and click on “Run helloworld.py”

Run helloworld.py - Python Helloworld.py Program - Python Tutorial - www.tutorialkart.com
Run helloworld.py

“Hello World!” is printed and the process is finished.

ADVERTISEMENT

Conclusion

In this Python Tutorial, we have learnt how to setup PyCharm IDE for Python Development and wrote our first Python Helloworld Program.