Python is one of the most popular programming languages today. It’s used not only to build apps and websites but also by data analysts for their analysis work. To get started, you need to install Python on Windows, Mac or Ubuntu, depending on your operating system. In this article, I’ll walk you through installing Python on all three.
Install Python on Windows and macOS
Installing Python on Windows and Mac works the same way. Let’s start with the steps below:
Step 1: Visit python.org/downloads and click the Download Python button.

Step 2: Open the installer you just downloaded. Just keep clicking the Continue button until the installation finishes.

Note: On Windows, make sure to check the Add Python to PATH box so you can run Python files in CMD.

Step 3: Once the installation is done, you’ll have a Python folder like this. You can open IDLE to start using Python.

Step 4: You need Pip to create virtual environments and install packages. Open CMD on Windows or Terminal on Mac, then run the following commands one by one to install Pip:
Download the Pip installation file:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
Start installing Pip:
python get-pip.py
Delete the Pip installation file on Mac (or Linux):
rm -rf get-pip.py
Delete the Pip installation file on Windows (CMD):
del get-pip.py

Install Python on Ubuntu
Ubuntu comes with Python by default. But if you need a specific Python version, follow these steps:
Step 1: If you use Ubuntu Server, connect to your machine via SSH. If you use Ubuntu Desktop, open the Terminal app.
Step 2: Check the default Python version on Ubuntu. If it isn’t the version you need, continue with the installation step below.
python3 --version
Step 3: Run the commands below to install Python on Ubuntu.

Update the package list in Ubuntu:
sudo apt update
Install Python on Ubuntu: Replace 3.10 with the version you need.
sudo apt install python3.10
Install Pip on Ubuntu:
sudo apt install python3-pip
A quick Python test
Open CMD on Windows or Terminal on Mac and Ubuntu. Try the commands below to check that Python works on your computer.

Check the Python version:
python --version
Start Python and print a message:
python
print("Hello world!")
Exit Python:
exit()
Note: On macOS and Ubuntu, if the python command doesn’t work, use python3 instead.
Use a Python virtual environment
You’ll usually need to install extra packages for your work and projects. However, libraries can conflict with each other and even break the default Python environment. That’s why it’s a good idea to create a separate virtual environment for each project.
For this part, I recommend reading Python’s documentation because I find it very clear and helpful. If you work in data science, check out how to create a Python virtual environment using Conda.
Conclusion
With this tutorial, you should now have Python fully installed on Windows, Mac or Ubuntu. Along with Python, data analysts often install SQL Server on Mac or Windows for learning and exploring data. Follow the data analysis articles on Lucid Gen for more, and if you have any questions, feel free to leave a comment below.





