Python for Robotics Installation Instructions
Installing Python is a straight-forward task and is widely supported on multiple platforms including Windows, Mac OS X, and Linux. This document will guide you through the installation process on the Windows & Mac platforms.
Once you have installed Python, you can move on to the next step: Setting up your environment.
What You Need to Have Before Installing Python
Python is a versatile language that you can use on the backend, frontend, or full stack of a web application. In this article, we will focus on the backend. We will explore the language and install the necessary tools to create a Python development environment on our computer.
Before we get started, we should make sure that our computer meets the minimum requirements for Python. We need to have the following:
- A text editor. This can be something as simple as Notepad++ or as full-featured as Visual Studio Code.
- A Python interpreter. This is the software that will take our Python code and turn it into instructions that the computer can understand.
- Python libraries. These are code libraries that we can use in our Python code to add functionality or make our lives easier.
Once we have these three things installed, we are ready to start writing Python code!
This page is a part of the larger guide on How to use Python for Robotics as a Beginner!
Installing Python on Windows
Python programming language is widely used and easy to learn. Code can be written and executed in Python by first installing it on our system.
Installing Python on Windows takes a series of few easy steps:
Step 1: Select Version of Python to Install
Python has various versions available with differences between the syntax and working of different versions of the language. The version required can be selected from https://www.python.org/downloads/.
Step 2: Download Python Executable Installer
On the web browser, in the official site of python (https://www.python.org/downloads/).
All the available versions of Python will be listed. Select the version required by you (usually the latest one) and click on Download. Let’s suppose, we choose the Python 3.9.6 version.
Different executable installers for various operating systems will be visible when you click “download.” Choose the installer that is compatible with your operating system and download it. For example, if you select the Windows installer (64 bits), the download will be less than 30 MB.
Step 3 − Run Executable Installer
Download the Python 3.9.6 Windows 64 bit installer.
Run the installer. Make sure both checkboxes at the bottom are selected, then click Install New.
The installation process begins when you click Install Now.
The installation process is quick and easy. Once it is finished, the following screen will be displayed.
Step 4 – Ensure that Python is installed on Windows
To check if Python has been installed correctly on your system, please follow these steps:
- Go to the Python 39 directory at C:\Users\Your_User_ID\AppData\Local\Programs\Python\Python39 (or to whatever directory Python was installed: see the pop-up window for Installing step 1).
- Double-click the python.exe icon or file.
- You’ll see the following pop-up window.
A pop-up window with the title C:\Users\Pattis\AppData\Local\Programs\Python\Python39\python.exe appears, and inside the window; on the first line is the text Python 3.9.6 … (notice that it should also say 64 bit). Inside the window, at the bottom left, is the prompt >>>: type exit() to this prompt and press enter to terminate Python.
We have successfully installed python and pip on our Windows system.
Installing Python on macOS
The most common (and advised) option for installing Python on a Mac is to get the most recent version from the official Python website (python.org). Let’s give it a shot.
Step 1. Download the Installer Package
Installer packages can be downloaded from the Python website first. To accomplish that, go to https://www.python.org/downloads/ on your Mac; it will automatically recognize your operating system and display a large button to download the most recent Python installer. If it doesn’t, select the most recent Python release by clicking the macOS link.
2. Run the Installer
Double-click the package to begin installing Python after the download is finished. The installer will guide you through a wizard to complete the installation, and in the majority of cases, the default settings are satisfactory. As such, install it similarly to other macOS programs. It’s possible that you’ll also need to enter your Mac’s password to confirm that you want to install Python.
Step 3. Python Folder Opens
After the installation is finished, the Python folder will be opened.
Step 4. Verification of Installation
Let’s check to see if IDLE and Python’s most recent installation went smoothly. Double-click IDLE, the integrated development environment that came with Python, to accomplish it. In a perfect world, IDLE would display the Python shell as follows:
Step 5. Writing Some Basic Python Code
Write some straightforward Python code and execute it in IDLE. Press the return key after typing the next sentence.
Conclusion
Although not the easiest thing in the world to understand right of the bat (unless you’re an IT professional), but the installation of Python usually goes fairly smoothly. It just a matter of knowing where to get the installation files, which options to select during the installation and to finally do a test once all is installed.
Ready to check out the next section? Click here: Python Variables and Data Types in Robotics.
[site_reviews assigned_posts=”post_id”]