> Installing Python and Python Development Tools

Installing Python and Python Development Tools

Install Python and learn the main tools used to write, run, debug and manage Python programs

Python Development Environment

To run Python programs on your computer, you normally need the Python interpreter and a way to write and execute code. You can use a terminal, code editor, integrated development environment or interactive notebook depending on the type of work you are doing.

Python Runs Python programs
VS Code Lightweight code editor
PyCharm Python-focused IDE
Jupyter Interactive Python notebooks

1. Install Python

Python is the main software required to execute Python programs. Install a current supported Python release appropriate for your operating system.

Basic Installation Process

1 Download Python from the official Python website.
2 Start the installer for your operating system.
3 Complete the installation using the available installer options.
4 Open a new terminal or command prompt.
5 Check that Python is available from the terminal.

Check Python Version

Terminal
python --version

On systems where the Python command is exposed as python3, use:

Terminal
python3 --version
Important: After installation, verify that the Python interpreter can be launched from the terminal before configuring an editor or IDE.

2. Run Python from Terminal or Command Prompt

The terminal is the simplest way to run Python. It is useful for testing Python installations, executing scripts and installing packages.

Start the Python Interactive Shell

Terminal
python

You can then execute Python statements interactively.

Python
print("Hello, Python!")
print(10 + 20)

Run a Python File

Suppose your Python file is named app.py.

Terminal
python app.py

3. Python with Visual Studio Code

Visual Studio Code is a lightweight source-code editor that can be configured for Python development.

Basic Setup

  1. Install Python.
  2. Install Visual Studio Code.
  3. Install the Python extension available for VS Code.
  4. Open a project folder.
  5. Create a Python file such as app.py.
  6. Select the Python interpreter for the project.
  7. Run or debug the program.

Example Python Program

app.py
name = "Python"

print("Hello,", name)
print("Python is ready!")
Professional Use: VS Code is useful when you want one flexible editor for Python, web development, APIs, AI applications, notebooks and other technologies.

4. Python with PyCharm

PyCharm is an integrated development environment designed specifically for Python development.

โŒจ๏ธ

Code Editor

Write and organize Python programs using a dedicated development environment.

๐Ÿž

Debugger

Debug programs and inspect variables while the application is running.

๐Ÿ“

Project Management

Organize source files, project settings, interpreters and environments.

๐Ÿ“ฆ

Package Support

Work with Python packages and project dependencies.

๐Ÿงช

Testing

Create and run automated tests for Python projects.

๐Ÿ”

Code Intelligence

Use features such as code completion, navigation and inspections.

5. Jupyter Notebook and JupyterLab

Jupyter provides an interactive environment where Python code, explanations, results, tables and visualizations can be combined in a notebook.

Useful for

  • Learning Python
  • Data analysis
  • Data visualization
  • Machine learning experiments
  • Scientific computing
  • AI experimentation

Example

Jupyter Cell
numbers = [10, 20, 30, 40, 50]

average = sum(numbers) / len(numbers)

average
Best Fit: Jupyter is especially useful for interactive data analysis, experimentation and teaching.

6. Anaconda and Conda

Anaconda is a Python distribution commonly used for data science, scientific computing and machine learning. It provides tools for managing Python environments and packages.

๐Ÿ

Python

Provides a Python environment for development and data-focused workflows.

๐Ÿ“ฆ

Packages

Helps install and manage packages used by data science and scientific applications.

๐ŸŒฑ

Environments

Create separate environments for different projects.

Example Conda Commands

Terminal
conda create --name myproject python
conda activate myproject

7. Python Virtual Environments

A virtual environment creates an isolated Python environment for a project. This helps keep project dependencies separate.

Create a Virtual Environment

Terminal
python -m venv .venv

Activate on Windows

Windows
.venv\Scripts\activate

Activate on macOS or Linux

macOS / Linux
source .venv/bin/activate
Professional Practice: Use a separate virtual environment for each project when project dependencies need to remain isolated.

8. pip โ€” Python Package Manager

pip is commonly used to install and manage Python packages from the Python package ecosystem.

Check pip

Terminal
python -m pip --version

Install a Package

Terminal
python -m pip install requests

Install Common Data Science Packages

Terminal
python -m pip install numpy pandas matplotlib
Tip: Using python -m pip makes it explicit which Python interpreter is being used to run pip.

9. Other Ways to Run Python

๐Ÿ’ป

Python IDLE

A basic development environment included with standard Python installations.

๐ŸŒ

Online Python Editors

Browser-based environments can run Python without requiring a local development setup.

๐Ÿ““

Notebook Platforms

Interactive notebook environments can be useful for learning, analysis and experiments.

๐Ÿณ

Containers

Python applications can run inside containerized development and deployment environments.

โ˜๏ธ

Cloud Development

Cloud development environments can provide Python runtimes without a local installation.

โš™๏ธ

Command Line

Python scripts can be executed directly from operating-system terminals.

10. Which Tool Should You Use?

Tool Best For Learning Level
Python + Terminal Basic scripts and command-line work Beginner
VS Code General Python and application development Beginner โ†’ Professional
PyCharm Structured Python application development Intermediate โ†’ Professional
Jupyter Data analysis and experimentation Beginner โ†’ Professional
Anaconda Data science and scientific computing Beginner โ†’ Professional
Python IDLE Simple Python learning and testing Beginner

11. Complete Python Setup Workflow

A typical local Python development setup can follow this workflow:

Install Python
โ†’
Create Project
โ†’
Create .venv
โ†’
Install Packages
โ†’
Open in VS Code / PyCharm
โ†’
Run Python
โ†’
Test and Debug

12. Troubleshooting

Python Command Is Not Recognized

If the terminal cannot find the Python command, verify that Python was installed correctly and that the interpreter is available through the system PATH.

Check Python

Terminal
python --version

Check pip

Terminal
python -m pip --version

Check Which Python Is Being Used

Windows
where python
macOS / Linux
which python3
Common Problem: If an editor runs a different Python interpreter from the one used in your terminal, select the intended interpreter in the editor's Python environment settings.

13. Professional Python Setup Checklist

Python is installed
Python version is verified
pip is available
A code editor or IDE is installed
Project folder is created
Virtual environment is configured
Required packages are installed
Python interpreter is selected
A test program runs successfully
Debugging workflow is understood

14. Final Professional Setup

A Python development environment does not require every available tool. Choose tools according to the type of Python work you are doing.

Recommended Learning Path:
Python
โ†’
Terminal
โ†’
VS Code / PyCharm
โ†’
Virtual Environment
โ†’
pip
โ†’
Python Projects