Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
The beginner's guide: How to Install Python, SQL, and R
Explore IT ProfessionsDevelopment Tools

The beginner's guide: How to Install Python, SQL, and R

How to install Python, SQL, R

Andrii Chornyi

by Andrii Chornyi

Data Scientist, ML Engineer

Aug, 2023
13 min read

facebooklinkedintwitter
copy

In the world of Data Analysis and Data Science, there is no single "silver bullet" in terms of tools and programming languages. Depending on the task, Data Scientists can turn to a variety of tools, and three of the most popular and in-demand languages in the field are Python, R, and SQL.

Whether you're new to Data Science or an experienced data analyst, it's important to have all of these tools on your computer to work effectively with data. In this beginner's guide, we'll take a look at how to install Python, R, and SQL step by step so you can start your journey into the world of data analysis without too much hassle.

How to install Python

Python is a high-level programming language that, due to its readability and simplicity, is becoming the first choice for many aspiring Data Scientists. Its versatility makes Python ideal for a variety of tasks, from web development to artificial intelligence. However, in the context of data analysis, Python offers many libraries such as Pandas and Scikit-learn, making it an indispensable tool in data science.

Resources:

Step by step installation Python for Windows

Step 1. Download Python for Windows from the link or go to the official Python website and choose the version you need.

Step 2. Run the downloaded file and press “Install Now”. Be sure to check “Add Python 3.X to PATH”.

Install Python for Windows

Step 3. Wait until the installation is done. Now you can run Python via the command line with python command:

Run Python via the command line

Or with IDLE application (you can find it in Start menu):

IDLE application

Example code in IDLE:

Example code in IDLE

Step by step installation Python for macOS

Step 1. Download Python for macOS from the link or go to the official Python website and choose the version you need.

Step 2. Run the downloaded file and just press “Continue” all the time.

Install Python for macOS

Step 3. Press “Agree” when it asks you to accept the license.

Install Python for macOS

Step 4. Continue until the installer asks you to give it the permission to install Python. Enter your password and press “Install Software”.

Install Python for macOS

Step 5. Wait until the installation is done. Now you can run Python via the IDLE application:

Install Python for macOS

Example code in IDLE:

Example code in IDLE

Run Code from Your Browser - No Installation Required

How to install SQL

SQL makes it possible to efficiently manage and query data stored in relational databases. Almost any data scientist will face the need to retrieve data from a database, and this is where SQL becomes essential. It allows you to easily structure, aggregate and analyze large amounts of data.

Resources:

Step by step installation MySQL for Windows

Step 1. Follow the link, choose the latest version, Windows operating system and press “Download” button:

Installation MySQL for Windows

Note

The top download is an online downloader that will download data from the internet during the installation process. It is recommended to use it, but you can use the full installer instead.

Step 2. On the next page press “No thanks, just start my download.”.

Installation MySQL for Windows

Step 3. Run the downloaded installer. Choose “Full” installation and press the “Next” button.

Installation MySQL for Windows

Step 4. Press the “Execute” button and wait for the end of the installation.

Installation MySQL for Windows

Step 5. Go next to the “Type and Networking” and change the port parameter to the port you want or just leave it as default.

Installation MySQL for Windows

Step 6. Go next to the “Accounts and Roles” and choose your password for the admin account.

Installation MySQL for Windows

Step 7. Then you can go up to the end of the installation without changing anything. Check these options to get started with MySQL right away:

Installation MySQL for Windows

Step by step installation MySQL for macOS

Step 1. Follow the link, choose the latest version, macOS operating system and press “Download” button depending on your architecture (ARM or x86):

Installation MySQL for macOS

Step 2. On the next page press “No thanks, just start my download.”.

Installation MySQL for macOS

Step 3. Run the downloaded installer and go next by pressing the “Continue” button.

Installation MySQL for macOS

Step 4. When the license window appears press the “Agree” button to continue.

Installation MySQL for macOS

Step 5. Press the “Install” button.

Installation MySQL for macOS

Step 6. Then the installer asks you to give it the permission to install MySQL. Enter your password and press “Install Software”. Wait for the end of the installation.

Installation MySQL for macOS

Step 7. After the installation it asks you about the password encryption type. Leave as it is.

Installation MySQL for macOS

Step 8. Then you can set up the password for the admin user. Check this option to run MySQL Server and then press “Finish”:

Installation MySQL for macOS

Step 9. Allow the installer to make changes on your PC:

Installation MySQL for macOS

Step 10. To run installed MySQL you can use the terminal. First, change the directory to the MySQL bin folder using cd /usr/local/mysql/bin and then run mysql -u root -p command.

Run installed MySQL

-u root option means that we want to enter the database as “root” (admin) user. -p option means that we want to enter the password after the command.

Note

When you enter the password nothing would be shown on the screen. This is done for security purposes so don’t worry about it.

Step 11. Now you successfully entered the Data Base Management System (DBMS) and you can manage the MySQL database.

How to install R

R was created specifically for statistical computing and graphics. In the world of data analysis, R provides intuitive tools for statistical analysis and data visualization. With rich features such as the ggplot2 library, R is becoming the go-to tool for many statisticians and data scientists.

Resources for R:

Step by step installation R for Windows

Step 1. Download R for Windows from the link or choose another version from the official R website.

Step 2. Then the installation of R is pretty straightforward. Just run the installer and press the “Next” button.

Installation R for Windows

Step 3. If you wish you can change the destination folder.

Installation R for Windows

Step 4. Also I recommend you to create a desktop icon for R. All the other steps can be run with standard settings.

Installation R for Windows

Step 5. After the installation is done you can run the desktop icon and get started with R.

Get started with R

Step by step installation R for macOS:

Step 1. Download R for macOS from the link or choose another version from the official R website.

Step 2. Run the installer and press the “Continue” button until the license agreement.

Installation R for macOS

Step 3. Click accept on the license agreement.

Installation R for macOS

Step 4. Then the installer asks you to give it the permission to install R. Enter your password and press “Install Software”. Wait for the end of the installation.

Installation R for macOS

Step 5. After the installation is done you can run the application and get started with R.

Get started with R

Start Learning Coding today and boost your Career Potential

Online code runner with Codefinity

Instead of installing all the software on your computer, you can use the Codefinity platform's built-in code runner. It is a tool that allows users to write, test and run code directly in the browser. This is especially valuable for beginners who may run into problems installing and configuring various tools and libraries. With Codefinity, the learning process becomes as smooth and comfortable as possible.

It is important to note that the courses on Codefinity are developed by professionals and are of high quality content. Each course contains a lot of practical tasks, which allows you not only to learn new information, but also immediately apply the acquired knowledge in practice. Of course, this approach makes learning on Codefinity as effective as possible.

FAQs

Q: Why can’t I run Python through the console on Windows?
A: Check that you added your Python version to the PATH variable to be able to run programs through the console. You can do it directly from the installer.

Run Python through the console on Windows

Q: How to open the console on Windows?
A: Press Windows + R keys. Type in "cmd" and press Enter. The console will open.

Press Windows + R keys. Type in `cmd` and press Enter to open the console on Windows.

Q: How to open the terminal on macOS?
A: Click the Launchpad icon in the Dock (bottom panel), type “Terminal” in the search field, then click on the Terminal icon.

Type 'Terminal' in the search field to open the terminal on macOS

Q: How to install packages for Python?
A: Open console and type pip install PACKAGE_NAME. For example here’s the installation process of matplotlib library for Python:

installation process of matplotlib library for Python

Q: How to run a file with Python code?
A: Open a console or a terminal and type the word python followed by the path to your script file like this:

For example, you have a file hello.py with code:

Then you can run it like this:

installation process of matplotlib library for Python

Was this article helpful?

Share:

facebooklinkedintwitter
copy

Was this article helpful?

Share:

facebooklinkedintwitter
copy

Content of this article

some-alt