1.2 Setting Up the Environment

12 1 0
                                        

Installing Python on Various Operating Systems

Python can be installed on Windows, macOS, and Linux. Follow the steps below based on your operating system.

WINDOWS

Download Python

Visit Click on "Download Python" (latest version)

Install Python

Run the downloaded .exe file
Check the box "Add Python to PATH"
Click "Install Now" and follow the instructions

Verify Installation

Open Command Prompt and type:
python --version
You should see the installed Python version

MACOS

Check if Python is Pre-installed

Open Terminal and type:
python3 --version
If Python is installed, it will display the version

Install Python (if not installed or outdated)

Install Homebrew (if not installed):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Install Python using Homebrew:
brew install python

Verify Installation

Run:
python3 --version

LINUX (UBUNTU/DEBIAN-BASED DISTRIBUTIONS)

Check Python Version
python3 --version

Install Python (if necessary)

Update package lists:
sudo apt update

Install Python:
sudo apt install python3

Verify Installation
python3 --version

For other Linux distributions, use the appropriate package manager (e.g., dnf for Fedora, pacman for Arch Linux).

INTRODUCTION TO IDEs AND TEXT EDITORS

Once Python is installed, you need an IDE (Integrated Development Environment) or a text editor to write and execute Python code.

POPULAR PYTHON IDEs

PyCharm – Best for professional development, rich features
Visual Studio Code (VS Code) – Lightweight, customizable, with extensions
IDLE – Comes with Python, simple for beginners
Jupyter Notebook – Great for data science and interactive coding

POPULAR TEXT EDITORS

Sublime Text – Lightweight and fast
Notepad++ – Useful for quick scripting
Vim/Emacs – Powerful for advanced users

CHOOSING THE RIGHT IDE

For beginners: IDLE or VS CodeFor
Professionals: PyCharm
For Data Science: Jupyter Notebook

By setting up Python and selecting a suitable IDE, you are ready to start coding!

You've reached the end of published parts.

⏰ Last updated: Mar 17 ⏰

Add this story to your Library to get notified about new parts!

Python SyntaxWhere stories live. Discover now