1.0 Installing Python

Learning Python Coding

Python Installation

Python: The Universally Accessible Programming Language

Imagine Python as a toolbox full of different tools that you can use to build all sorts of things. It’s like having a magic kit that lets you create anything you can imagine!

First off, Python is a free and open toolbox, which means anyone can use it without having to pay for it. It’s like getting access to all the tools you need without having to spend any money.

Now, inside this toolbox, there’s a special tool called a “programming language.” This tool is like a set of instructions that tells your computer what to do. And Python is one of the friendliest and most versatile programming languages out there.

When you’re using Python, it’s a bit like exploring a magical world with different entrances. You might enter through a web browser like Chrome, Firefox, or Safari, but no matter which entrance you choose, you’ll end up in the same magical place.

Once you’re inside Python, you can do all sorts of cool stuff. Here are some examples:

  1. Building Websites: You can use Python to create your own websites with fun features and games.
  2. Playing with Data: Python helps you understand and play with data, like figuring out trends in your favorite games or movies.
  3. Teaching Computers: You can teach your computer to do things automatically, like sending you a reminder when it’s time to take a break from studying.
  4. Making Art and Games: Python lets you create your own art or even build simple games that you and your friends can play together.
  5. Solving Science Problems: Python is like a superpower for scientists! You can use it to solve complex science problems or even simulate experiments.
  6. Creating Cool Apps: Ever wanted to make your own app? With Python, you can bring your ideas to life and create apps that help people in all sorts of ways.

So, just like a magic toolbox, Python is full of endless possibilities. Whether you’re a beginner or an expert, there’s always something new and exciting to discover!

To use Python you will need three things

  1. Text Editor : Where you type-in your code
  2. Python Interpreter : Where you can run your code and get output from it
  3. Debugger : A program that helps you to fin mistakes in your code and fix them

With this in mind we have two options of Python install

Thonny Python Install:

  • Thonny is like a complete package deal for coding in Python. It’s designed to be easy to use, especially for beginners.
  • When you install Thonny, you’re getting not just a text editor (where you write your code) but also a Python interpreter (which runs your code) and a debugger (which helps you find and fix mistakes).
  • It’s like having everything you need in one place, making it great for learning because you can see your code in action right away.

Sublime Text Install:

  • Sublime Text is like a fancy notebook where you write your code. It’s sleek and customizable, and many professional programmers love it for its flexibility.
  • However, when you install Sublime Text, you’re only getting the text editor itself. You still need to set up Python separately on your computer if you want to run your code.
  • Think of it like having a really nice pen to write with, but you still need to find your own paper (Python interpreter) to see your code come to life.

In short, Thonny gives you everything you need in one simple package, while Sublime Text is more like a blank canvas where you can create, but you need to gather your tools separately.


1. Thonny : Quick and Easy

  1. Go to https://thonny.org and download the latest version of Thonny.
  2. Thonny’s most significant advantage is that it is a single bundle, and you do not need any additional installs. Ready in a single install.
  3. It has a built-in text editor and an integrated Phyton IDE (code), an easily accessible Run Terminal. Plus, other features like a variable list, code checker.

2. Sublime Text + Python : The Fancy install

For this type of installation, we need to install a Python IDE and a text editor separately. After installation, we must link both of them to work together seamlessly.

  1. To start the installation process, visit https://www.python.org/downloads/ and download the latest version of Python. Once it’s downloaded, run the installation setup.
  2. During the installation process, ensure that you select the option “Add Python to PATH” (as shown in Image below) to avoid any issues later.

3. Complete the remaining installation steps using the default setting

4. Next, we’re going to set up the text editor. We’ve picked Sublime Text because it’s free, open-source, reliable and highly customizable

https://www.sublimetext.com

5. Windows Install: Use the default settings and complete the installation.

6. Post-installation, Start Sublime Text from the Start Menu

We have installed our text editor and Python separately. Now we need to link them together


8. Open Sublime Text.

On the top panel, you have options such as File, Edit. Locate Tools.

Follow the path below Tools—> Install Package Control  

9. Once Package Control is installed, we will get the following message.

10. In the Top Panel of Sublime text, go to ‘Preferences’ and ‘Package Control’

Preferences—> Package Control

11. Once you click on ‘Package Control’, a search bar will pop up, wherein we can search the ‘connecting packages’

Connecting package will connect our ‘Sublime Text’ with ‘Python.’

12. In the ‘Package Control Search Bar’ type “Install Packages”

13. When you select ‘Install Packages’, we can search for various Packages in the search bar

14. In the ‘Search Bar’, Search for ‘Terminus’

15. Press ‘Enter’ and ‘Terminus’ will get installed.

16. Now comes the final step of activating ‘Terminus’ and connecting to ‘Python’

Follow the below path.

Tools —> Command Palette

17. The ‘Command Palette Search Bar’ will Open

18. In the ‘Search Bar’ Type,

Terminus : Open Default Shell in Panel

and press Enter

19. The Terminus Window will Open Below and indicate that our Installation is complete and Python is linked.

In a similar manner, install the following Packages

  1. Tabnine : It is like a spelling checker. It will check if you are spelling the commands correctly and will suggest corrections if required.
  2. AutoPep8 : AutoPep8 is a standard for Python Program for how it should look. For example when we press ‘Tab’ how many spaces it should have. This package will check if the standard is followed.
  3. SublimeLinter : A linter package is like a helpful assistant for your code. It’s a tool that checks your code for errors, style issues, and other potential problems. Just like a spell checker in a word processor helps you catch typos, a linter helps you catch mistakes in your code. For example, if you forget to put a parenthesis at the end of a line, or if you misspell a variable name, the linter will point out those errors to you. It’s especially handy when you’re learning to code because it helps you understand what you did wrong and how to fix it. Think of it as having a coding buddy who looks over your shoulder and says, “Hey, you might want to double-check that line

Links for other text editors :  Sublime Text, VIM, Notepad++, Visual Studio Code.

Course Homepage Next Chapter

1 Comment

  1. […] Prev Chapter    Course Homepage    Next Chapter […]

Leave a reply

Your email address will not be published. Required fields are marked *