How to download and install Python
- Open any web Browser and type the following URL in the address bar.
(Currently ongoing version of Python is 3.7.0 but based on compatible issues here I chose to download python version 3.5.1)
- To download python to your system click on downloads, by scrolling down the screen there it is displayed that specific releases of python versions by number. Then click on download for the version you need.
- In the Files Section Select windows x86-64-executable installer file. The download of the executable file is started and will be stored in downloads folder.
4.Now click on this executable file and start the installation process by simple steps.
5.Click Customize installation and click on Add python 3.5 to PATH.
Note: Please make sure that you have selected the check box of add python 3.5 to PATH, for automatic setting of Environmental variable.
- Click on Next. Select browse to give the user defined location for storing python interpreter and related files.
Before this create a folder in D drive(or any other drive) with name called python. You can also create a folder by clicking on make a new folder here with name called python and select.
- Click on Ok.
- Next click on Install. It will ask confirmation message. Click on Yes. Now installation starts and it takes some time.
- Once the installation finished you will get a message as Setup was successful and click on You can also check the related files are stored in the folder which you have created before.
Click here for detailed Guide: Python_Installation
How to Check whether the python is installed or not?
We can interact with Python by using either Command Line window or the IDLE Development Environment.
- Type cmd in the run, open the command prompt. Type python and click enter it will show the details of the installed version and now it is connected with Python Interpreter.
2.Another way to open the IDLE prompt is just type IDLE in the run.
3.Double click on the IDLE.Then it displays the following window.
One important point here is that check the current working directory. Type the following two lines of code in the python prompt.
Your path should match with the above path. D:\\Python.
Now you are ready to do the Python Programs
How to create, save and run python scripts?
To create and save the python scripts you must do the following.
- Double click on IDLE
- ctrl+n (for new window)
- ctrl+s ( to save the code)
- The python scripts must be saved in the destination folder which you have created during installation.
- The notable thing here is that every python code that you are going to execute must be saved with “.py” extension which indicates to the operating system and programmer that the file is actually a Python program.
Running python scripts
After typing and saving the code press “F5” to run the module. Then your output will be displayed
When you run a Python script, the interpreter converts a Python program into something that the computer can understand.