This chapter will explain in detail about setting up the Python environment on your local computer.
Before you proceed with learning further on Python, we suggest you to check whether the following prerequisites are met −
Latest version of Python is installed on your computer
An IDE or text editor is installed
You have basic familiarity to write and debug in Python, that is you can do the following in Python −
Able to write and run Python programs.
Debug programs and diagnose errors.
Work with basic data types.
Write for loops, while loops, and if statements
Code functions
If you don’t have any programming language experience, you can find lots of beginner tutorials in Python on
https://www.tutorialpoints.com/The following steps show you in detail how to install Python on your local computer −
Step 1 − Go to the official Python website https://www.python.org/, click on the Downloads menu and choose the latest or any stable version of your choice.
Step 2 − Save the Python installer exe file that you’re downloading and once you have downloaded it, open it. Click on Run and choose Next option by default and finish the installation.
Step 3 − After you have installed, you should now see the Python menu as shown in the image below. Start the program by choosing IDLE (Python GUI).
This will start the Python shell. Type in simple commands to check the installation.
An Integrated Development Environment is a text editor geared towards software development. You will have to install an IDE to control the flow of your programming and to group projects together when working on Python. Here are some of IDEs avaialable online. You can choose one at your convenience.
Note − Eclipse IDE is mostly used in Java, however it has a Python plugin.
Pycharm, the cross-platform IDE is one of the most popular IDE currently available. It provides coding assistance and analysis with code completion, project and code navigation, integrated unit testing, version control integration, debugging and much more
Languages Supported − Python, HTML, CSS, JavaScript, Coffee Script, TypeScript, Cython,AngularJS, Node.js, template languages.
PyCharm offers the following features and benefits for its users −
It is a polyglot IDE which supports 100+ languages and basically for dynamic languages such as Python, PHP and Ruby. It is a commercial IDE available for 21 days free trial with full functionality. ActiveState is the software company managing the development of the Komodo IDE. It also offers a trimmed version of Komodo known as Komodo Edit for simple programming tasks.
This IDE contains all kinds of features from most basic to advanced level. If you are a student or a freelancer, then you can buy it almost half of the actual price. However, it’s completely free for teachers and professors from recognized institutions and universities.
It got all the features you need for web and mobile development, including support for all your languages and frameworks.
The download links for Komodo Edit(free version) and Komodo IDE(paid version) are as given here −
Komodo Edit (free)
https://www.activestate.com/komodo-editKomodo IDE (paid)
https://www.activestate.com/komodo-ide/downloads/ideIt includes basic features like integrated debugger support, auto complete, Document Object Model(DOM) viewer, code browser, interactive shells, breakpoint configuration, code profiling, integrated unit testing. In short, it is a professional IDE with a host of productivity-boosting features.
It is an open-source IDE for Python and Ruby. Eric is a full featured editor and IDE, written in Python. It is based on the cross platform Qt GUI toolkit, integrating the highly flexible Scintilla editor control. The IDE is very much configurable and one can choose what to use and what not. You can download Eric IDE from below link:
https://eric-ide.python-projects.org/eric-download.htmlYou may not always need an IDE. For tasks such as learning to code with Python or Arduino, or when working on a quick script in shell script to help you automate some tasks a simple and light weight code-centric text editor will do. Also many text editors offer features such as syntax highlighting and in-program script execution, similar to IDEs. Some of the text editors are given here −
Atom is a hackable text editor built by the team of GitHub. It is a free and open source text and code editor which means that all the code is available for you to read, modify for your own use and even contribute improvements. It is a cross-platform text editor compatible for macOS, Linux, and Microsoft Windows with support for plug-ins written in Node.js and embedded Git Control.
C/C++, C#, CSS, CoffeeScript, HTML, JavaScript, Java, JSON, Julia, Objective-C, PHP, Perl, Python, Ruby on Rails, Ruby, Shell script, Scala, SQL, XML, YAML and many more.
Sublime text is a proprietary software and it offers you a free trial version to test it before you purchase it. According to stackoverflow.com, it’s the fourth most popular Development Environment.
Some of the advantages it provides is its incredible speed, ease of use and community support. It also supports many programming languages and mark-up languages, and functions can be added by users with plugins, typically community-built and maintained under free-software licenses.
Customize key bindings, menus, snippets, macros, completions and more.
Auto completion feature
Opens Quickly
Cross Platform support for Mac, Linux and Windows.
Jump the cursor to where you want to go
Select Multiple Lines, Words and Columns
It’s a free source code editor and Notepad replacement that supports several languages from Assembly to XML and including Python. Running in the MS windows environment, its use is governed by GPL license. In addition to syntax highlighting, Notepad++ has some features that are particularly useful to coders.